// $ANTLR 3.4 /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g 2012-01-25 17:03:56

    package compilers;
    import java.util.Vector;
    
    import compilers.condition.*;
    import compilers.output.*;
    import compilers.types.*;
    import compilers.stmt.*;
    import compilers.table.*;
    import compilers.node.*;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

import org.antlr.runtime.tree.*;


@SuppressWarnings({"all", "warnings", "unchecked"})
public class myGrammarParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "CHAR", "CHAR_LITERAL", "COMMA", "COMMENT", "CONST", "DIGIT", "DPOINT", "EQUAL", "FLOAT", "IDENT", "INCLUDE", "INT", "INTEGER", "LBRACK", "LETTER", "LPAR", "MULTILINE_COMMENT", "MULTILINE_EOF", "QMARK", "RBRACK", "REAL", "RPAR", "SEMI", "STRING_LITERAL", "TYPEDEF", "VOID", "WS", "'!'", "'!='", "'%'", "'&&'", "'*'", "'+'", "'-'", "'/'", "'<'", "'<='", "'=='", "'>'", "'>='", "'['", "']'", "'break'", "'continue'", "'else'", "'if'", "'printf'", "'return'", "'scanf'", "'while'", "'||'"
    };

    public static final int EOF=-1;
    public static final int T__31=31;
    public static final int T__32=32;
    public static final int T__33=33;
    public static final int T__34=34;
    public static final int T__35=35;
    public static final int T__36=36;
    public static final int T__37=37;
    public static final int T__38=38;
    public static final int T__39=39;
    public static final int T__40=40;
    public static final int T__41=41;
    public static final int T__42=42;
    public static final int T__43=43;
    public static final int T__44=44;
    public static final int T__45=45;
    public static final int T__46=46;
    public static final int T__47=47;
    public static final int T__48=48;
    public static final int T__49=49;
    public static final int T__50=50;
    public static final int T__51=51;
    public static final int T__52=52;
    public static final int T__53=53;
    public static final int T__54=54;
    public static final int CHAR=4;
    public static final int CHAR_LITERAL=5;
    public static final int COMMA=6;
    public static final int COMMENT=7;
    public static final int CONST=8;
    public static final int DIGIT=9;
    public static final int DPOINT=10;
    public static final int EQUAL=11;
    public static final int FLOAT=12;
    public static final int IDENT=13;
    public static final int INCLUDE=14;
    public static final int INT=15;
    public static final int INTEGER=16;
    public static final int LBRACK=17;
    public static final int LETTER=18;
    public static final int LPAR=19;
    public static final int MULTILINE_COMMENT=20;
    public static final int MULTILINE_EOF=21;
    public static final int QMARK=22;
    public static final int RBRACK=23;
    public static final int REAL=24;
    public static final int RPAR=25;
    public static final int SEMI=26;
    public static final int STRING_LITERAL=27;
    public static final int TYPEDEF=28;
    public static final int VOID=29;
    public static final int WS=30;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


    public myGrammarParser(TokenStream input) {
        this(input, new RecognizerSharedState());
    }
    public myGrammarParser(TokenStream input, RecognizerSharedState state) {
        super(input, state);
    }

protected TreeAdaptor adaptor = new CommonTreeAdaptor();

public void setTreeAdaptor(TreeAdaptor adaptor) {
    this.adaptor = adaptor;
}
public TreeAdaptor getTreeAdaptor() {
    return adaptor;
}
    public String[] getTokenNames() { return myGrammarParser.tokenNames; }
    public String getGrammarFileName() { return "/Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g"; }


      boolean stdioIncluded = false;
      int whileCounter = 0;
      SymbolTable symbolTable = new SymbolTable();
      Program root = new Program();
      Stack<FunctionType> currentFunc = new Stack<FunctionType>();


    public static class include_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "include"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:33:1: include : INCLUDE ;
    public final myGrammarParser.include_return include() throws RecognitionException {
        myGrammarParser.include_return retval = new myGrammarParser.include_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token INCLUDE1=null;

        CommonTree INCLUDE1_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:33:8: ( INCLUDE )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:33:10: INCLUDE
            {
            root_0 = (CommonTree)adaptor.nil();


            INCLUDE1=(Token)match(input,INCLUDE,FOLLOW_INCLUDE_in_include68); 
            INCLUDE1_tree = 
            (CommonTree)adaptor.create(INCLUDE1)
            ;
            adaptor.addChild(root_0, INCLUDE1_tree);


            stdioIncluded = true;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "include"


    public static class smallc_program_return extends ParserRuleReturnScope {
        public Node root;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "smallc_program"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:35:1: smallc_program returns [Node root] : ( include )? ( typedef | funct_decl | funct | var )* EOF !;
    public final myGrammarParser.smallc_program_return smallc_program() throws RecognitionException {
        myGrammarParser.smallc_program_return retval = new myGrammarParser.smallc_program_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token EOF7=null;
        myGrammarParser.include_return include2 =null;

        myGrammarParser.typedef_return typedef3 =null;

        myGrammarParser.funct_decl_return funct_decl4 =null;

        myGrammarParser.funct_return funct5 =null;

        myGrammarParser.var_return var6 =null;


        CommonTree EOF7_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:39:2: ( ( include )? ( typedef | funct_decl | funct | var )* EOF !)
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:39:4: ( include )? ( typedef | funct_decl | funct | var )* EOF !
            {
            root_0 = (CommonTree)adaptor.nil();


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:39:4: ( include )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==INCLUDE) ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:39:4: include
                    {
                    pushFollow(FOLLOW_include_in_smallc_program85);
                    include2=include();

                    state._fsp--;

                    adaptor.addChild(root_0, include2.getTree());

                    }
                    break;

            }


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:39:13: ( typedef | funct_decl | funct | var )*
            loop2:
            do {
                int alt2=5;
                alt2 = dfa2.predict(input);
                switch (alt2) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:39:14: typedef
            	    {
            	    pushFollow(FOLLOW_typedef_in_smallc_program89);
            	    typedef3=typedef();

            	    state._fsp--;

            	    adaptor.addChild(root_0, typedef3.getTree());

            	    root.addChild((typedef3!=null?typedef3.parent:null));

            	    }
            	    break;
            	case 2 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:40:4: funct_decl
            	    {
            	    pushFollow(FOLLOW_funct_decl_in_smallc_program97);
            	    funct_decl4=funct_decl();

            	    state._fsp--;

            	    adaptor.addChild(root_0, funct_decl4.getTree());

            	    root.addChild((funct_decl4!=null?funct_decl4.parent:null));

            	    }
            	    break;
            	case 3 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:41:4: funct
            	    {
            	    pushFollow(FOLLOW_funct_in_smallc_program105);
            	    funct5=funct();

            	    state._fsp--;

            	    adaptor.addChild(root_0, funct5.getTree());

            	    root.addChild((funct5!=null?funct5.parent:null));

            	    }
            	    break;
            	case 4 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:42:4: var
            	    {
            	    pushFollow(FOLLOW_var_in_smallc_program113);
            	    var6=var();

            	    state._fsp--;

            	    adaptor.addChild(root_0, var6.getTree());

            	    root.addChild((var6!=null?var6.parent:null));

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            EOF7=(Token)match(input,EOF,FOLLOW_EOF_in_smallc_program119); 

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);


              retval.root = root;
              symbolTable.checkMain();

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "smallc_program"


    public static class typedef_return extends ParserRuleReturnScope {
        public Typedef parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "typedef"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:44:1: typedef returns [Typedef parent] : TYPEDEF type ( IDENT ) SEMI ;
    public final myGrammarParser.typedef_return typedef() throws RecognitionException {
        myGrammarParser.typedef_return retval = new myGrammarParser.typedef_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token TYPEDEF8=null;
        Token IDENT10=null;
        Token SEMI11=null;
        myGrammarParser.type_return type9 =null;


        CommonTree TYPEDEF8_tree=null;
        CommonTree IDENT10_tree=null;
        CommonTree SEMI11_tree=null;

        String name=""; Type newType = null;
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:45:46: ( TYPEDEF type ( IDENT ) SEMI )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:46:2: TYPEDEF type ( IDENT ) SEMI
            {
            root_0 = (CommonTree)adaptor.nil();


            TYPEDEF8=(Token)match(input,TYPEDEF,FOLLOW_TYPEDEF_in_typedef137); 
            TYPEDEF8_tree = 
            (CommonTree)adaptor.create(TYPEDEF8)
            ;
            adaptor.addChild(root_0, TYPEDEF8_tree);


            pushFollow(FOLLOW_type_in_typedef139);
            type9=type();

            state._fsp--;

            adaptor.addChild(root_0, type9.getTree());

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:47:2: ( IDENT )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:47:3: IDENT
            {
            IDENT10=(Token)match(input,IDENT,FOLLOW_IDENT_in_typedef144); 
            IDENT10_tree = 
            (CommonTree)adaptor.create(IDENT10)
            ;
            adaptor.addChild(root_0, IDENT10_tree);


            name=(IDENT10!=null?IDENT10.getText():null);newType=(type9!=null?type9.type:null);

            }


            retval.parent = new Typedef(newType, new Identifier(name)); symbolTable.addType(name, newType);

            SEMI11=(Token)match(input,SEMI,FOLLOW_SEMI_in_typedef153); 
            SEMI11_tree = 
            (CommonTree)adaptor.create(SEMI11)
            ;
            adaptor.addChild(root_0, SEMI11_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "typedef"


    public static class funct_decl_return extends ParserRuleReturnScope {
        public Node parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "funct_decl"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:50:1: funct_decl returns [Node parent] : return_type IDENT LPAR ( paramlist_decl[t] )? RPAR SEMI ;
    public final myGrammarParser.funct_decl_return funct_decl() throws RecognitionException {
        myGrammarParser.funct_decl_return retval = new myGrammarParser.funct_decl_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token IDENT13=null;
        Token LPAR14=null;
        Token RPAR16=null;
        Token SEMI17=null;
        myGrammarParser.return_type_return return_type12 =null;

        myGrammarParser.paramlist_decl_return paramlist_decl15 =null;


        CommonTree IDENT13_tree=null;
        CommonTree LPAR14_tree=null;
        CommonTree RPAR16_tree=null;
        CommonTree SEMI17_tree=null;

        FunctionType t = null; String name;
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:51:44: ( return_type IDENT LPAR ( paramlist_decl[t] )? RPAR SEMI )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:51:46: return_type IDENT LPAR ( paramlist_decl[t] )? RPAR SEMI
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_return_type_in_funct_decl169);
            return_type12=return_type();

            state._fsp--;

            adaptor.addChild(root_0, return_type12.getTree());

            IDENT13=(Token)match(input,IDENT,FOLLOW_IDENT_in_funct_decl171); 
            IDENT13_tree = 
            (CommonTree)adaptor.create(IDENT13)
            ;
            adaptor.addChild(root_0, IDENT13_tree);


            t = new FunctionType((return_type12!=null?return_type12.type:null), new Identifier((IDENT13!=null?IDENT13.getText():null))); name = (IDENT13!=null?IDENT13.getText():null);

            LPAR14=(Token)match(input,LPAR,FOLLOW_LPAR_in_funct_decl175); 
            LPAR14_tree = 
            (CommonTree)adaptor.create(LPAR14)
            ;
            adaptor.addChild(root_0, LPAR14_tree);


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:51:161: ( paramlist_decl[t] )?
            int alt3=2;
            int LA3_0 = input.LA(1);

            if ( (LA3_0==CHAR||LA3_0==CONST||(LA3_0 >= FLOAT && LA3_0 <= IDENT)||LA3_0==INT) ) {
                alt3=1;
            }
            switch (alt3) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:51:161: paramlist_decl[t]
                    {
                    pushFollow(FOLLOW_paramlist_decl_in_funct_decl177);
                    paramlist_decl15=paramlist_decl(t);

                    state._fsp--;

                    adaptor.addChild(root_0, paramlist_decl15.getTree());

                    }
                    break;

            }


            RPAR16=(Token)match(input,RPAR,FOLLOW_RPAR_in_funct_decl181); 
            RPAR16_tree = 
            (CommonTree)adaptor.create(RPAR16)
            ;
            adaptor.addChild(root_0, RPAR16_tree);


            SEMI17=(Token)match(input,SEMI,FOLLOW_SEMI_in_funct_decl183); 
            SEMI17_tree = 
            (CommonTree)adaptor.create(SEMI17)
            ;
            adaptor.addChild(root_0, SEMI17_tree);


            symbolTable.addFunction(name, t, input.LT(1)); symbolTable.checkFunctionParam(name, t, input.LT(1));  retval.parent =t;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "funct_decl"


    public static class paramlist_decl_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "paramlist_decl"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:53:1: paramlist_decl[FunctionType t] : (t1= type ( (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? )? ) ( COMMA t2= type ( (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )? )* ;
    public final myGrammarParser.paramlist_decl_return paramlist_decl(FunctionType t) throws RecognitionException {
        myGrammarParser.paramlist_decl_return retval = new myGrammarParser.paramlist_decl_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token id1=null;
        Token i1=null;
        Token id2=null;
        Token i2=null;
        Token char_literal18=null;
        Token char_literal19=null;
        Token COMMA20=null;
        Token char_literal21=null;
        Token char_literal22=null;
        myGrammarParser.type_return t1 =null;

        myGrammarParser.type_return t2 =null;


        CommonTree id1_tree=null;
        CommonTree i1_tree=null;
        CommonTree id2_tree=null;
        CommonTree i2_tree=null;
        CommonTree char_literal18_tree=null;
        CommonTree char_literal19_tree=null;
        CommonTree COMMA20_tree=null;
        CommonTree char_literal21_tree=null;
        CommonTree char_literal22_tree=null;

        Param tmp;
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:19: ( (t1= type ( (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? )? ) ( COMMA t2= type ( (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )? )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:21: (t1= type ( (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? )? ) ( COMMA t2= type ( (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )? )*
            {
            root_0 = (CommonTree)adaptor.nil();


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:21: (t1= type ( (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? )? )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:22: t1= type ( (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? )?
            {
            pushFollow(FOLLOW_type_in_paramlist_decl202);
            t1=type();

            state._fsp--;

            adaptor.addChild(root_0, t1.getTree());

            t.addParameter(tmp=new Param((t1!=null?t1.type:null)));

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:73: ( (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? )?
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==IDENT) ) {
                alt6=1;
            }
            switch (alt6) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:74: (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )?
                    {
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:74: (id1= IDENT )
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:75: id1= IDENT
                    {
                    id1=(Token)match(input,IDENT,FOLLOW_IDENT_in_paramlist_decl210); 
                    id1_tree = 
                    (CommonTree)adaptor.create(id1)
                    ;
                    adaptor.addChild(root_0, id1_tree);


                    }


                    tmp.addIdentifier(new Identifier((id1!=null?id1.getText():null)));

                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:134: ( '[' (i1= INTEGER )? ']' )?
                    int alt5=2;
                    int LA5_0 = input.LA(1);

                    if ( (LA5_0==44) ) {
                        alt5=1;
                    }
                    switch (alt5) {
                        case 1 :
                            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:135: '[' (i1= INTEGER )? ']'
                            {
                            char_literal18=(Token)match(input,44,FOLLOW_44_in_paramlist_decl216); 
                            char_literal18_tree = 
                            (CommonTree)adaptor.create(char_literal18)
                            ;
                            adaptor.addChild(root_0, char_literal18_tree);


                            (t1!=null?t1.type:null).setArray();

                            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:162: (i1= INTEGER )?
                            int alt4=2;
                            int LA4_0 = input.LA(1);

                            if ( (LA4_0==INTEGER) ) {
                                alt4=1;
                            }
                            switch (alt4) {
                                case 1 :
                                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:54:163: i1= INTEGER
                                    {
                                    i1=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_paramlist_decl223); 
                                    i1_tree = 
                                    (CommonTree)adaptor.create(i1)
                                    ;
                                    adaptor.addChild(root_0, i1_tree);


                                    (t1!=null?t1.type:null).setArray(Integer.valueOf((i1!=null?i1.getText():null)));

                                    }
                                    break;

                            }


                            char_literal19=(Token)match(input,45,FOLLOW_45_in_paramlist_decl229); 
                            char_literal19_tree = 
                            (CommonTree)adaptor.create(char_literal19)
                            ;
                            adaptor.addChild(root_0, char_literal19_tree);


                            }
                            break;

                    }


                    }
                    break;

            }


            }


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:6: ( COMMA t2= type ( (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )? )*
            loop10:
            do {
                int alt10=2;
                int LA10_0 = input.LA(1);

                if ( (LA10_0==COMMA) ) {
                    alt10=1;
                }


                switch (alt10) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:7: COMMA t2= type ( (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )?
            	    {
            	    COMMA20=(Token)match(input,COMMA,FOLLOW_COMMA_in_paramlist_decl242); 
            	    COMMA20_tree = 
            	    (CommonTree)adaptor.create(COMMA20)
            	    ;
            	    adaptor.addChild(root_0, COMMA20_tree);


            	    pushFollow(FOLLOW_type_in_paramlist_decl246);
            	    t2=type();

            	    state._fsp--;

            	    adaptor.addChild(root_0, t2.getTree());

            	    t.addParameter(tmp=new Param((t2!=null?t2.type:null)));

            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:64: ( (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )?
            	    int alt9=2;
            	    int LA9_0 = input.LA(1);

            	    if ( (LA9_0==IDENT) ) {
            	        alt9=1;
            	    }
            	    switch (alt9) {
            	        case 1 :
            	            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:65: (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )?
            	            {
            	            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:65: (id2= IDENT )
            	            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:66: id2= IDENT
            	            {
            	            id2=(Token)match(input,IDENT,FOLLOW_IDENT_in_paramlist_decl254); 
            	            id2_tree = 
            	            (CommonTree)adaptor.create(id2)
            	            ;
            	            adaptor.addChild(root_0, id2_tree);


            	            }


            	            tmp.addIdentifier(new Identifier((id2!=null?id2.getText():null)));

            	            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:125: ( '[' (i2= INTEGER )? ']' )?
            	            int alt8=2;
            	            int LA8_0 = input.LA(1);

            	            if ( (LA8_0==44) ) {
            	                alt8=1;
            	            }
            	            switch (alt8) {
            	                case 1 :
            	                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:126: '[' (i2= INTEGER )? ']'
            	                    {
            	                    char_literal21=(Token)match(input,44,FOLLOW_44_in_paramlist_decl260); 
            	                    char_literal21_tree = 
            	                    (CommonTree)adaptor.create(char_literal21)
            	                    ;
            	                    adaptor.addChild(root_0, char_literal21_tree);


            	                    (t2!=null?t2.type:null).setArray();

            	                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:153: (i2= INTEGER )?
            	                    int alt7=2;
            	                    int LA7_0 = input.LA(1);

            	                    if ( (LA7_0==INTEGER) ) {
            	                        alt7=1;
            	                    }
            	                    switch (alt7) {
            	                        case 1 :
            	                            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:55:154: i2= INTEGER
            	                            {
            	                            i2=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_paramlist_decl267); 
            	                            i2_tree = 
            	                            (CommonTree)adaptor.create(i2)
            	                            ;
            	                            adaptor.addChild(root_0, i2_tree);


            	                            (t2!=null?t2.type:null).setArray(Integer.valueOf((i2!=null?i2.getText():null)));

            	                            }
            	                            break;

            	                    }


            	                    char_literal22=(Token)match(input,45,FOLLOW_45_in_paramlist_decl273); 
            	                    char_literal22_tree = 
            	                    (CommonTree)adaptor.create(char_literal22)
            	                    ;
            	                    adaptor.addChild(root_0, char_literal22_tree);


            	                    }
            	                    break;

            	            }


            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop10;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "paramlist_decl"


    public static class funct_return extends ParserRuleReturnScope {
        public Stmt parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "funct"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:57:1: funct returns [Stmt parent] : return_type IDENT LPAR ( paramlist[t] )? RPAR ( compound_stmt_func ) ;
    public final myGrammarParser.funct_return funct() throws RecognitionException {
        myGrammarParser.funct_return retval = new myGrammarParser.funct_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token IDENT24=null;
        Token LPAR25=null;
        Token RPAR27=null;
        myGrammarParser.return_type_return return_type23 =null;

        myGrammarParser.paramlist_return paramlist26 =null;

        myGrammarParser.compound_stmt_func_return compound_stmt_func28 =null;


        CommonTree IDENT24_tree=null;
        CommonTree LPAR25_tree=null;
        CommonTree RPAR27_tree=null;

        FunctionType t = null; String name; 
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:63:2: ( return_type IDENT LPAR ( paramlist[t] )? RPAR ( compound_stmt_func ) )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:63:4: return_type IDENT LPAR ( paramlist[t] )? RPAR ( compound_stmt_func )
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_return_type_in_funct304);
            return_type23=return_type();

            state._fsp--;

            adaptor.addChild(root_0, return_type23.getTree());

            IDENT24=(Token)match(input,IDENT,FOLLOW_IDENT_in_funct306); 
            IDENT24_tree = 
            (CommonTree)adaptor.create(IDENT24)
            ;
            adaptor.addChild(root_0, IDENT24_tree);


            name = (IDENT24!=null?IDENT24.getText():null); t = new FunctionType((return_type23!=null?return_type23.type:null), new Identifier(name)); t.setBody(); symbolTable.addFunction(name, t, input.LT(1)); currentFunc.push(t);

            LPAR25=(Token)match(input,LPAR,FOLLOW_LPAR_in_funct310); 
            LPAR25_tree = 
            (CommonTree)adaptor.create(LPAR25)
            ;
            adaptor.addChild(root_0, LPAR25_tree);


            symbolTable.setScope(new Scope(symbolTable.getScope()));

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:63:252: ( paramlist[t] )?
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0==CHAR||LA11_0==CONST||(LA11_0 >= FLOAT && LA11_0 <= IDENT)||LA11_0==INT) ) {
                alt11=1;
            }
            switch (alt11) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:63:252: paramlist[t]
                    {
                    pushFollow(FOLLOW_paramlist_in_funct314);
                    paramlist26=paramlist(t);

                    state._fsp--;

                    adaptor.addChild(root_0, paramlist26.getTree());

                    }
                    break;

            }


            RPAR27=(Token)match(input,RPAR,FOLLOW_RPAR_in_funct318); 
            RPAR27_tree = 
            (CommonTree)adaptor.create(RPAR27)
            ;
            adaptor.addChild(root_0, RPAR27_tree);


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:63:271: ( compound_stmt_func )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:63:272: compound_stmt_func
            {
            pushFollow(FOLLOW_compound_stmt_func_in_funct321);
            compound_stmt_func28=compound_stmt_func();

            state._fsp--;

            adaptor.addChild(root_0, compound_stmt_func28.getTree());

            t.addStatement((compound_stmt_func28!=null?compound_stmt_func28.parent:null)); 

            }


             symbolTable.checkFunctionParam(name, t, input.LT(1)); currentFunc.pop(); retval.parent =t; symbolTable.setScope(symbolTable.getScope().getParent());

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);


              if(!t.hasReturn() && !(t.getReturnType() instanceof VoidType)) {
                new ErrorOutput(input.LT(1),"Function doesn't have a return");
              }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "funct"


    public static class paramlist_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "paramlist"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:1: paramlist[FunctionType t] : (t1= type (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? ) ( COMMA t2= type (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )* ;
    public final myGrammarParser.paramlist_return paramlist(FunctionType t) throws RecognitionException {
        myGrammarParser.paramlist_return retval = new myGrammarParser.paramlist_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token id1=null;
        Token i1=null;
        Token id2=null;
        Token i2=null;
        Token char_literal29=null;
        Token char_literal30=null;
        Token COMMA31=null;
        Token char_literal32=null;
        Token char_literal33=null;
        myGrammarParser.type_return t1 =null;

        myGrammarParser.type_return t2 =null;


        CommonTree id1_tree=null;
        CommonTree i1_tree=null;
        CommonTree id2_tree=null;
        CommonTree i2_tree=null;
        CommonTree char_literal29_tree=null;
        CommonTree char_literal30_tree=null;
        CommonTree COMMA31_tree=null;
        CommonTree char_literal32_tree=null;
        CommonTree char_literal33_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:27: ( (t1= type (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? ) ( COMMA t2= type (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:29: (t1= type (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? ) ( COMMA t2= type (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )*
            {
            root_0 = (CommonTree)adaptor.nil();


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:29: (t1= type (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )? )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:30: t1= type (id1= IDENT ) ( '[' (i1= INTEGER )? ']' )?
            {
            pushFollow(FOLLOW_type_in_paramlist338);
            t1=type();

            state._fsp--;

            adaptor.addChild(root_0, t1.getTree());

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:38: (id1= IDENT )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:39: id1= IDENT
            {
            id1=(Token)match(input,IDENT,FOLLOW_IDENT_in_paramlist343); 
            id1_tree = 
            (CommonTree)adaptor.create(id1)
            ;
            adaptor.addChild(root_0, id1_tree);


            symbolTable.getScope().addVariable((id1!=null?id1.getText():null), (t1!=null?t1.type:null), input.LT(1)); t.addParameter(new Param((t1!=null?t1.type:null), new Identifier((id1!=null?id1.getText():null))));

            }


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:186: ( '[' (i1= INTEGER )? ']' )?
            int alt13=2;
            int LA13_0 = input.LA(1);

            if ( (LA13_0==44) ) {
                alt13=1;
            }
            switch (alt13) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:187: '[' (i1= INTEGER )? ']'
                    {
                    char_literal29=(Token)match(input,44,FOLLOW_44_in_paramlist349); 
                    char_literal29_tree = 
                    (CommonTree)adaptor.create(char_literal29)
                    ;
                    adaptor.addChild(root_0, char_literal29_tree);


                    (t1!=null?t1.type:null).setArray();

                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:214: (i1= INTEGER )?
                    int alt12=2;
                    int LA12_0 = input.LA(1);

                    if ( (LA12_0==INTEGER) ) {
                        alt12=1;
                    }
                    switch (alt12) {
                        case 1 :
                            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:65:215: i1= INTEGER
                            {
                            i1=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_paramlist356); 
                            i1_tree = 
                            (CommonTree)adaptor.create(i1)
                            ;
                            adaptor.addChild(root_0, i1_tree);


                            (t1!=null?t1.type:null).setArray(Integer.valueOf((i1!=null?i1.getText():null)));

                            }
                            break;

                    }


                    char_literal30=(Token)match(input,45,FOLLOW_45_in_paramlist362); 
                    char_literal30_tree = 
                    (CommonTree)adaptor.create(char_literal30)
                    ;
                    adaptor.addChild(root_0, char_literal30_tree);


                    }
                    break;

            }


            }


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:66:8: ( COMMA t2= type (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )? )*
            loop16:
            do {
                int alt16=2;
                int LA16_0 = input.LA(1);

                if ( (LA16_0==COMMA) ) {
                    alt16=1;
                }


                switch (alt16) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:66:9: COMMA t2= type (id2= IDENT ) ( '[' (i2= INTEGER )? ']' )?
            	    {
            	    COMMA31=(Token)match(input,COMMA,FOLLOW_COMMA_in_paramlist376); 
            	    COMMA31_tree = 
            	    (CommonTree)adaptor.create(COMMA31)
            	    ;
            	    adaptor.addChild(root_0, COMMA31_tree);


            	    pushFollow(FOLLOW_type_in_paramlist380);
            	    t2=type();

            	    state._fsp--;

            	    adaptor.addChild(root_0, t2.getTree());

            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:66:23: (id2= IDENT )
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:66:24: id2= IDENT
            	    {
            	    id2=(Token)match(input,IDENT,FOLLOW_IDENT_in_paramlist385); 
            	    id2_tree = 
            	    (CommonTree)adaptor.create(id2)
            	    ;
            	    adaptor.addChild(root_0, id2_tree);


            	    symbolTable.getScope().addVariable((id2!=null?id2.getText():null), (t2!=null?t2.type:null), input.LT(1)); t.addParameter(new Param((t2!=null?t2.type:null), new Identifier((id2!=null?id2.getText():null))));

            	    }


            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:66:171: ( '[' (i2= INTEGER )? ']' )?
            	    int alt15=2;
            	    int LA15_0 = input.LA(1);

            	    if ( (LA15_0==44) ) {
            	        alt15=1;
            	    }
            	    switch (alt15) {
            	        case 1 :
            	            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:66:172: '[' (i2= INTEGER )? ']'
            	            {
            	            char_literal32=(Token)match(input,44,FOLLOW_44_in_paramlist391); 
            	            char_literal32_tree = 
            	            (CommonTree)adaptor.create(char_literal32)
            	            ;
            	            adaptor.addChild(root_0, char_literal32_tree);


            	            (t2!=null?t2.type:null).setArray();

            	            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:66:199: (i2= INTEGER )?
            	            int alt14=2;
            	            int LA14_0 = input.LA(1);

            	            if ( (LA14_0==INTEGER) ) {
            	                alt14=1;
            	            }
            	            switch (alt14) {
            	                case 1 :
            	                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:66:200: i2= INTEGER
            	                    {
            	                    i2=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_paramlist398); 
            	                    i2_tree = 
            	                    (CommonTree)adaptor.create(i2)
            	                    ;
            	                    adaptor.addChild(root_0, i2_tree);


            	                    (t2!=null?t2.type:null).setArray(Integer.valueOf((i2!=null?i2.getText():null)));

            	                    }
            	                    break;

            	            }


            	            char_literal33=(Token)match(input,45,FOLLOW_45_in_paramlist404); 
            	            char_literal33_tree = 
            	            (CommonTree)adaptor.create(char_literal33)
            	            ;
            	            adaptor.addChild(root_0, char_literal33_tree);


            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop16;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "paramlist"


    public static class var_return extends ParserRuleReturnScope {
        public Node parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "var"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:68:1: var returns [Node parent] : type varlist[$type.type] SEMI !;
    public final myGrammarParser.var_return var() throws RecognitionException {
        myGrammarParser.var_return retval = new myGrammarParser.var_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token SEMI36=null;
        myGrammarParser.type_return type34 =null;

        myGrammarParser.varlist_return varlist35 =null;


        CommonTree SEMI36_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:68:25: ( type varlist[$type.type] SEMI !)
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:68:27: type varlist[$type.type] SEMI !
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_type_in_var418);
            type34=type();

            state._fsp--;

            adaptor.addChild(root_0, type34.getTree());

            pushFollow(FOLLOW_varlist_in_var420);
            varlist35=varlist((type34!=null?type34.type:null));

            state._fsp--;

            adaptor.addChild(root_0, varlist35.getTree());

            retval.parent = (varlist35!=null?varlist35.parent:null);

            SEMI36=(Token)match(input,SEMI,FOLLOW_SEMI_in_var425); 

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "var"


    public static class varlist_return extends ParserRuleReturnScope {
        public Node parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "varlist"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:70:1: varlist[Type type] returns [Node parent] : v1= varid[$type] ( COMMA v2= varid[$type.clone()] )* ;
    public final myGrammarParser.varlist_return varlist(Type type) throws RecognitionException {
        myGrammarParser.varlist_return retval = new myGrammarParser.varlist_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token COMMA37=null;
        myGrammarParser.varid_return v1 =null;

        myGrammarParser.varid_return v2 =null;


        CommonTree COMMA37_tree=null;


        VarList v = new VarList();

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:73:2: (v1= varid[$type] ( COMMA v2= varid[$type.clone()] )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:73:4: v1= varid[$type] ( COMMA v2= varid[$type.clone()] )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_varid_in_varlist444);
            v1=varid(type);

            state._fsp--;

            adaptor.addChild(root_0, v1.getTree());

            v.addVar((v1!=null?v1.parent:null), symbolTable.getScope(), input.LT(1));

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:73:81: ( COMMA v2= varid[$type.clone()] )*
            loop17:
            do {
                int alt17=2;
                int LA17_0 = input.LA(1);

                if ( (LA17_0==COMMA) ) {
                    alt17=1;
                }


                switch (alt17) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:73:82: COMMA v2= varid[$type.clone()]
            	    {
            	    COMMA37=(Token)match(input,COMMA,FOLLOW_COMMA_in_varlist450); 
            	    COMMA37_tree = 
            	    (CommonTree)adaptor.create(COMMA37)
            	    ;
            	    adaptor.addChild(root_0, COMMA37_tree);


            	    pushFollow(FOLLOW_varid_in_varlist454);
            	    v2=varid(type.clone());

            	    state._fsp--;

            	    adaptor.addChild(root_0, v2.getTree());

            	    v.addVar((v2!=null?v2.parent:null), symbolTable.getScope(), input.LT(1));

            	    }
            	    break;

            	default :
            	    break loop17;
                }
            } while (true);


            retval.parent = v;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "varlist"


    public static class varid_return extends ParserRuleReturnScope {
        public Var parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "varid"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:75:1: varid[Type type] returns [Var parent] : ( IDENT ) ( EQUAL ( condition | array_init[var, count, tmp, ident] ) )? ;
    public final myGrammarParser.varid_return varid(Type type) throws RecognitionException {
        myGrammarParser.varid_return retval = new myGrammarParser.varid_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token IDENT38=null;
        Token EQUAL39=null;
        myGrammarParser.condition_return condition40 =null;

        myGrammarParser.array_init_return array_init41 =null;


        CommonTree IDENT38_tree=null;
        CommonTree EQUAL39_tree=null;


        int count = 0;
        Var var = null;
        Type tmp = type;
        Identifier ident = null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:81:3: ( ( IDENT ) ( EQUAL ( condition | array_init[var, count, tmp, ident] ) )? )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:82:2: ( IDENT ) ( EQUAL ( condition | array_init[var, count, tmp, ident] ) )?
            {
            root_0 = (CommonTree)adaptor.nil();


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:82:2: ( IDENT )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:82:2: IDENT
            {
            IDENT38=(Token)match(input,IDENT,FOLLOW_IDENT_in_varid480); 
            IDENT38_tree = 
            (CommonTree)adaptor.create(IDENT38)
            ;
            adaptor.addChild(root_0, IDENT38_tree);


            var = new Var(tmp, ident=new Identifier((IDENT38!=null?IDENT38.getText():null), input.LT(1), symbolTable.getScope()));tmp.setArray(0);

            }


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:83:2: ( EQUAL ( condition | array_init[var, count, tmp, ident] ) )?
            int alt19=2;
            int LA19_0 = input.LA(1);

            if ( (LA19_0==EQUAL) ) {
                alt19=1;
            }
            switch (alt19) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:83:2: EQUAL ( condition | array_init[var, count, tmp, ident] )
                    {
                    EQUAL39=(Token)match(input,EQUAL,FOLLOW_EQUAL_in_varid487); 
                    EQUAL39_tree = 
                    (CommonTree)adaptor.create(EQUAL39)
                    ;
                    adaptor.addChild(root_0, EQUAL39_tree);


                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:84:2: ( condition | array_init[var, count, tmp, ident] )
                    int alt18=2;
                    int LA18_0 = input.LA(1);

                    if ( (LA18_0==CHAR_LITERAL||LA18_0==IDENT||LA18_0==INTEGER||LA18_0==LPAR||LA18_0==REAL||LA18_0==31||LA18_0==37||LA18_0==50||LA18_0==52) ) {
                        alt18=1;
                    }
                    else if ( (LA18_0==LBRACK) ) {
                        alt18=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 18, 0, input);

                        throw nvae;

                    }
                    switch (alt18) {
                        case 1 :
                            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:84:3: condition
                            {
                            pushFollow(FOLLOW_condition_in_varid492);
                            condition40=condition();

                            state._fsp--;

                            adaptor.addChild(root_0, condition40.getTree());

                            var = new Var(tmp, new Identifier((IDENT38!=null?IDENT38.getText():null), input.LT(1), symbolTable.getScope()), (condition40!=null?condition40.parent:null));symbolTable.checkTypes(tmp, (condition40!=null?condition40.type:null), true, input.LT(1));

                            }
                            break;
                        case 2 :
                            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:85:4: array_init[var, count, tmp, ident]
                            {
                            pushFollow(FOLLOW_array_init_in_varid499);
                            array_init41=array_init(var, count, tmp, ident);

                            state._fsp--;

                            adaptor.addChild(root_0, array_init41.getTree());

                            }
                            break;

                    }


                    }
                    break;

            }


            retval.parent = var;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "varid"


    public static class array_init_return extends ParserRuleReturnScope {
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "array_init"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:88:1: array_init[Var var, int count, Type tmp, Identifier ident] : LBRACK e1= condition ( COMMA e2= condition )* RBRACK ;
    public final myGrammarParser.array_init_return array_init(Var var, int count, Type tmp, Identifier ident) throws RecognitionException {
        myGrammarParser.array_init_return retval = new myGrammarParser.array_init_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token LBRACK42=null;
        Token COMMA43=null;
        Token RBRACK44=null;
        myGrammarParser.condition_return e1 =null;

        myGrammarParser.condition_return e2 =null;


        CommonTree LBRACK42_tree=null;
        CommonTree COMMA43_tree=null;
        CommonTree RBRACK44_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:88:59: ( LBRACK e1= condition ( COMMA e2= condition )* RBRACK )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:89:1: LBRACK e1= condition ( COMMA e2= condition )* RBRACK
            {
            root_0 = (CommonTree)adaptor.nil();


            LBRACK42=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_array_init514); 
            LBRACK42_tree = 
            (CommonTree)adaptor.create(LBRACK42)
            ;
            adaptor.addChild(root_0, LBRACK42_tree);


            pushFollow(FOLLOW_condition_in_array_init518);
            e1=condition();

            state._fsp--;

            adaptor.addChild(root_0, e1.getTree());

            var.addExpression((e1!=null?e1.parent:null)); count++; symbolTable.checkTypes(tmp, (e1!=null?e1.type:null), true, input.LT(1));

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:90:2: ( COMMA e2= condition )*
            loop20:
            do {
                int alt20=2;
                int LA20_0 = input.LA(1);

                if ( (LA20_0==COMMA) ) {
                    alt20=1;
                }


                switch (alt20) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:90:2: COMMA e2= condition
            	    {
            	    COMMA43=(Token)match(input,COMMA,FOLLOW_COMMA_in_array_init523); 
            	    COMMA43_tree = 
            	    (CommonTree)adaptor.create(COMMA43)
            	    ;
            	    adaptor.addChild(root_0, COMMA43_tree);


            	    pushFollow(FOLLOW_condition_in_array_init527);
            	    e2=condition();

            	    state._fsp--;

            	    adaptor.addChild(root_0, e2.getTree());

            	    count++; var.addExpression((e2!=null?e2.parent:null)); symbolTable.checkTypes(tmp, (e2!=null?e2.type:null), true, input.LT(1));

            	    }
            	    break;

            	default :
            	    break loop20;
                }
            } while (true);


            RBRACK44=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_array_init534); 
            RBRACK44_tree = 
            (CommonTree)adaptor.create(RBRACK44)
            ;
            adaptor.addChild(root_0, RBRACK44_tree);


            symbolTable.checkArrayInit(count, ident, input.LT(1)); var.initArray();

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "array_init"


    public static class type_return extends ParserRuleReturnScope {
        public Type type;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "type"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:94:1: type returns [Type type] : ( CONST )? ( INT | FLOAT | CHAR | IDENT ) ;
    public final myGrammarParser.type_return type() throws RecognitionException {
        myGrammarParser.type_return retval = new myGrammarParser.type_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token CONST45=null;
        Token INT46=null;
        Token FLOAT47=null;
        Token CHAR48=null;
        Token IDENT49=null;

        CommonTree CONST45_tree=null;
        CommonTree INT46_tree=null;
        CommonTree FLOAT47_tree=null;
        CommonTree CHAR48_tree=null;
        CommonTree IDENT49_tree=null;

         boolean constant=false; 
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:95:34: ( ( CONST )? ( INT | FLOAT | CHAR | IDENT ) )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:96:2: ( CONST )? ( INT | FLOAT | CHAR | IDENT )
            {
            root_0 = (CommonTree)adaptor.nil();


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:96:2: ( CONST )?
            int alt21=2;
            int LA21_0 = input.LA(1);

            if ( (LA21_0==CONST) ) {
                alt21=1;
            }
            switch (alt21) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:96:3: CONST
                    {
                    CONST45=(Token)match(input,CONST,FOLLOW_CONST_in_type555); 
                    CONST45_tree = 
                    (CommonTree)adaptor.create(CONST45)
                    ;
                    adaptor.addChild(root_0, CONST45_tree);


                    constant=true;

                    }
                    break;

            }


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:97:2: ( INT | FLOAT | CHAR | IDENT )
            int alt22=4;
            switch ( input.LA(1) ) {
            case INT:
                {
                alt22=1;
                }
                break;
            case FLOAT:
                {
                alt22=2;
                }
                break;
            case CHAR:
                {
                alt22=3;
                }
                break;
            case IDENT:
                {
                alt22=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 22, 0, input);

                throw nvae;

            }

            switch (alt22) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:97:3: INT
                    {
                    INT46=(Token)match(input,INT,FOLLOW_INT_in_type564); 
                    INT46_tree = 
                    (CommonTree)adaptor.create(INT46)
                    ;
                    adaptor.addChild(root_0, INT46_tree);


                    retval.type = new IntType(constant); 

                    }
                    break;
                case 2 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:98:2: FLOAT
                    {
                    FLOAT47=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_type571); 
                    FLOAT47_tree = 
                    (CommonTree)adaptor.create(FLOAT47)
                    ;
                    adaptor.addChild(root_0, FLOAT47_tree);


                    retval.type = new FloatType(constant);

                    }
                    break;
                case 3 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:99:2: CHAR
                    {
                    CHAR48=(Token)match(input,CHAR,FOLLOW_CHAR_in_type578); 
                    CHAR48_tree = 
                    (CommonTree)adaptor.create(CHAR48)
                    ;
                    adaptor.addChild(root_0, CHAR48_tree);


                    retval.type = new CharType(constant);

                    }
                    break;
                case 4 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:100:2: IDENT
                    {
                    IDENT49=(Token)match(input,IDENT,FOLLOW_IDENT_in_type584); 
                    IDENT49_tree = 
                    (CommonTree)adaptor.create(IDENT49)
                    ;
                    adaptor.addChild(root_0, IDENT49_tree);


                    retval.type = symbolTable.resolveType((IDENT49!=null?IDENT49.getText():null), input.LT(1)); if(retval.type == null) {new ErrorOutput(input.LT(1), "Type doesn't exist.");}

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "type"


    public static class return_type_return extends ParserRuleReturnScope {
        public Type type;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "return_type"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:103:1: return_type returns [Type type] : (t1= type | VOID );
    public final myGrammarParser.return_type_return return_type() throws RecognitionException {
        myGrammarParser.return_type_return retval = new myGrammarParser.return_type_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token VOID50=null;
        myGrammarParser.type_return t1 =null;


        CommonTree VOID50_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:103:32: (t1= type | VOID )
            int alt23=2;
            int LA23_0 = input.LA(1);

            if ( (LA23_0==CHAR||LA23_0==CONST||(LA23_0 >= FLOAT && LA23_0 <= IDENT)||LA23_0==INT) ) {
                alt23=1;
            }
            else if ( (LA23_0==VOID) ) {
                alt23=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 23, 0, input);

                throw nvae;

            }
            switch (alt23) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:103:34: t1= type
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_type_in_return_type601);
                    t1=type();

                    state._fsp--;

                    adaptor.addChild(root_0, t1.getTree());

                    retval.type = (t1!=null?t1.type:null);

                    }
                    break;
                case 2 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:103:64: VOID
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    VOID50=(Token)match(input,VOID,FOLLOW_VOID_in_return_type607); 
                    VOID50_tree = 
                    (CommonTree)adaptor.create(VOID50)
                    ;
                    adaptor.addChild(root_0, VOID50_tree);


                    retval.type = new VoidType(true);

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "return_type"


    public static class varstmt_return extends ParserRuleReturnScope {
        public Stmt parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "varstmt"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:105:1: varstmt returns [Stmt parent] : ( var | stmt )* ;
    public final myGrammarParser.varstmt_return varstmt() throws RecognitionException {
        myGrammarParser.varstmt_return retval = new myGrammarParser.varstmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        myGrammarParser.var_return var51 =null;

        myGrammarParser.stmt_return stmt52 =null;



        Stmt vs = new Stmt();
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:106:29: ( ( var | stmt )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:106:31: ( var | stmt )*
            {
            root_0 = (CommonTree)adaptor.nil();


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:106:31: ( var | stmt )*
            loop24:
            do {
                int alt24=3;
                switch ( input.LA(1) ) {
                case CONST:
                    {
                    switch ( input.LA(2) ) {
                    case INT:
                        {
                        int LA24_3 = input.LA(3);

                        if ( (LA24_3==IDENT) ) {
                            int LA24_9 = input.LA(4);

                            if ( (LA24_9==COMMA||LA24_9==EQUAL||LA24_9==SEMI) ) {
                                alt24=1;
                            }
                            else if ( (LA24_9==LPAR) ) {
                                alt24=2;
                            }


                        }


                        }
                        break;
                    case FLOAT:
                        {
                        int LA24_4 = input.LA(3);

                        if ( (LA24_4==IDENT) ) {
                            int LA24_9 = input.LA(4);

                            if ( (LA24_9==COMMA||LA24_9==EQUAL||LA24_9==SEMI) ) {
                                alt24=1;
                            }
                            else if ( (LA24_9==LPAR) ) {
                                alt24=2;
                            }


                        }


                        }
                        break;
                    case CHAR:
                        {
                        int LA24_5 = input.LA(3);

                        if ( (LA24_5==IDENT) ) {
                            int LA24_9 = input.LA(4);

                            if ( (LA24_9==COMMA||LA24_9==EQUAL||LA24_9==SEMI) ) {
                                alt24=1;
                            }
                            else if ( (LA24_9==LPAR) ) {
                                alt24=2;
                            }


                        }


                        }
                        break;
                    case IDENT:
                        {
                        int LA24_8 = input.LA(3);

                        if ( (LA24_8==IDENT) ) {
                            int LA24_9 = input.LA(4);

                            if ( (LA24_9==COMMA||LA24_9==EQUAL||LA24_9==SEMI) ) {
                                alt24=1;
                            }
                            else if ( (LA24_9==LPAR) ) {
                                alt24=2;
                            }


                        }


                        }
                        break;

                    }

                    }
                    break;
                case INT:
                    {
                    int LA24_3 = input.LA(2);

                    if ( (LA24_3==IDENT) ) {
                        int LA24_9 = input.LA(3);

                        if ( (LA24_9==COMMA||LA24_9==EQUAL||LA24_9==SEMI) ) {
                            alt24=1;
                        }
                        else if ( (LA24_9==LPAR) ) {
                            alt24=2;
                        }


                    }


                    }
                    break;
                case FLOAT:
                    {
                    int LA24_4 = input.LA(2);

                    if ( (LA24_4==IDENT) ) {
                        int LA24_9 = input.LA(3);

                        if ( (LA24_9==COMMA||LA24_9==EQUAL||LA24_9==SEMI) ) {
                            alt24=1;
                        }
                        else if ( (LA24_9==LPAR) ) {
                            alt24=2;
                        }


                    }


                    }
                    break;
                case CHAR:
                    {
                    int LA24_5 = input.LA(2);

                    if ( (LA24_5==IDENT) ) {
                        int LA24_9 = input.LA(3);

                        if ( (LA24_9==COMMA||LA24_9==EQUAL||LA24_9==SEMI) ) {
                            alt24=1;
                        }
                        else if ( (LA24_9==LPAR) ) {
                            alt24=2;
                        }


                    }


                    }
                    break;
                case IDENT:
                    {
                    int LA24_6 = input.LA(2);

                    if ( (LA24_6==IDENT) ) {
                        int LA24_9 = input.LA(3);

                        if ( (LA24_9==COMMA||LA24_9==EQUAL||LA24_9==SEMI) ) {
                            alt24=1;
                        }
                        else if ( (LA24_9==LPAR) ) {
                            alt24=2;
                        }


                    }
                    else if ( (LA24_6==EQUAL||LA24_6==LPAR||LA24_6==QMARK||LA24_6==SEMI||(LA24_6 >= 32 && LA24_6 <= 43)||LA24_6==54) ) {
                        alt24=2;
                    }


                    }
                    break;
                case CHAR_LITERAL:
                case INTEGER:
                case LPAR:
                case REAL:
                case VOID:
                case 31:
                case 37:
                case 46:
                case 47:
                case 49:
                case 50:
                case 51:
                case 52:
                case 53:
                    {
                    alt24=2;
                    }
                    break;

                }

                switch (alt24) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:106:32: var
            	    {
            	    pushFollow(FOLLOW_var_in_varstmt625);
            	    var51=var();

            	    state._fsp--;

            	    adaptor.addChild(root_0, var51.getTree());

            	    vs.addNode((var51!=null?var51.parent:null));

            	    }
            	    break;
            	case 2 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:106:65: stmt
            	    {
            	    pushFollow(FOLLOW_stmt_in_varstmt631);
            	    stmt52=stmt();

            	    state._fsp--;

            	    adaptor.addChild(root_0, stmt52.getTree());

            	    vs.addNode((stmt52!=null?stmt52.parent:null));

            	    }
            	    break;

            	default :
            	    break loop24;
                }
            } while (true);


            retval.parent =vs;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "varstmt"


    public static class compound_stmt_return extends ParserRuleReturnScope {
        public Stmt parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "compound_stmt"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:108:1: compound_stmt returns [Stmt parent] : LBRACK varstmt RBRACK ;
    public final myGrammarParser.compound_stmt_return compound_stmt() throws RecognitionException {
        myGrammarParser.compound_stmt_return retval = new myGrammarParser.compound_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token LBRACK53=null;
        Token RBRACK55=null;
        myGrammarParser.varstmt_return varstmt54 =null;


        CommonTree LBRACK53_tree=null;
        CommonTree RBRACK55_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:108:36: ( LBRACK varstmt RBRACK )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:108:38: LBRACK varstmt RBRACK
            {
            root_0 = (CommonTree)adaptor.nil();


            LBRACK53=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_compound_stmt648); 
            LBRACK53_tree = 
            (CommonTree)adaptor.create(LBRACK53)
            ;
            adaptor.addChild(root_0, LBRACK53_tree);


            symbolTable.setScope(new Scope(symbolTable.getScope()));

            pushFollow(FOLLOW_varstmt_in_compound_stmt652);
            varstmt54=varstmt();

            state._fsp--;

            adaptor.addChild(root_0, varstmt54.getTree());

            retval.parent =(varstmt54!=null?varstmt54.parent:null);

            RBRACK55=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_compound_stmt656); 
            RBRACK55_tree = 
            (CommonTree)adaptor.create(RBRACK55)
            ;
            adaptor.addChild(root_0, RBRACK55_tree);


            symbolTable.setScope(symbolTable.getScope().getParent());

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "compound_stmt"


    public static class compound_stmt_func_return extends ParserRuleReturnScope {
        public Stmt parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "compound_stmt_func"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:110:1: compound_stmt_func returns [Stmt parent] : LBRACK varstmt RBRACK ;
    public final myGrammarParser.compound_stmt_func_return compound_stmt_func() throws RecognitionException {
        myGrammarParser.compound_stmt_func_return retval = new myGrammarParser.compound_stmt_func_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token LBRACK56=null;
        Token RBRACK58=null;
        myGrammarParser.varstmt_return varstmt57 =null;


        CommonTree LBRACK56_tree=null;
        CommonTree RBRACK58_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:110:41: ( LBRACK varstmt RBRACK )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:110:43: LBRACK varstmt RBRACK
            {
            root_0 = (CommonTree)adaptor.nil();


            LBRACK56=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_compound_stmt_func669); 
            LBRACK56_tree = 
            (CommonTree)adaptor.create(LBRACK56)
            ;
            adaptor.addChild(root_0, LBRACK56_tree);


            pushFollow(FOLLOW_varstmt_in_compound_stmt_func671);
            varstmt57=varstmt();

            state._fsp--;

            adaptor.addChild(root_0, varstmt57.getTree());

            retval.parent =(varstmt57!=null?varstmt57.parent:null);

            RBRACK58=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_compound_stmt_func674); 
            RBRACK58_tree = 
            (CommonTree)adaptor.create(RBRACK58)
            ;
            adaptor.addChild(root_0, RBRACK58_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "compound_stmt_func"


    public static class stmt_return extends ParserRuleReturnScope {
        public Stmt parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "stmt"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:112:1: stmt returns [Stmt parent] : ( cond_stmt | while_stmt | 'break' SEMI | 'continue' SEMI | 'return' SEMI | 'return' condition SEMI | expr SEMI | funct );
    public final myGrammarParser.stmt_return stmt() throws RecognitionException {
        myGrammarParser.stmt_return retval = new myGrammarParser.stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal61=null;
        Token SEMI62=null;
        Token string_literal63=null;
        Token SEMI64=null;
        Token string_literal65=null;
        Token SEMI66=null;
        Token string_literal67=null;
        Token SEMI69=null;
        Token SEMI71=null;
        myGrammarParser.cond_stmt_return cond_stmt59 =null;

        myGrammarParser.while_stmt_return while_stmt60 =null;

        myGrammarParser.condition_return condition68 =null;

        myGrammarParser.expr_return expr70 =null;

        myGrammarParser.funct_return funct72 =null;


        CommonTree string_literal61_tree=null;
        CommonTree SEMI62_tree=null;
        CommonTree string_literal63_tree=null;
        CommonTree SEMI64_tree=null;
        CommonTree string_literal65_tree=null;
        CommonTree SEMI66_tree=null;
        CommonTree string_literal67_tree=null;
        CommonTree SEMI69_tree=null;
        CommonTree SEMI71_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:112:27: ( cond_stmt | while_stmt | 'break' SEMI | 'continue' SEMI | 'return' SEMI | 'return' condition SEMI | expr SEMI | funct )
            int alt25=8;
            switch ( input.LA(1) ) {
            case 49:
                {
                alt25=1;
                }
                break;
            case 53:
                {
                alt25=2;
                }
                break;
            case 46:
                {
                alt25=3;
                }
                break;
            case 47:
                {
                alt25=4;
                }
                break;
            case 51:
                {
                int LA25_5 = input.LA(2);

                if ( (LA25_5==SEMI) ) {
                    alt25=5;
                }
                else if ( (LA25_5==CHAR_LITERAL||LA25_5==IDENT||LA25_5==INTEGER||LA25_5==LPAR||LA25_5==REAL||LA25_5==31||LA25_5==37||LA25_5==50||LA25_5==52) ) {
                    alt25=6;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 25, 5, input);

                    throw nvae;

                }
                }
                break;
            case IDENT:
                {
                int LA25_6 = input.LA(2);

                if ( (LA25_6==EQUAL||LA25_6==LPAR||LA25_6==QMARK||LA25_6==SEMI||(LA25_6 >= 32 && LA25_6 <= 43)||LA25_6==54) ) {
                    alt25=7;
                }
                else if ( (LA25_6==IDENT) ) {
                    alt25=8;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 25, 6, input);

                    throw nvae;

                }
                }
                break;
            case CHAR_LITERAL:
            case INTEGER:
            case LPAR:
            case REAL:
            case 31:
            case 37:
            case 50:
            case 52:
                {
                alt25=7;
                }
                break;
            case CHAR:
            case CONST:
            case FLOAT:
            case INT:
            case VOID:
                {
                alt25=8;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 25, 0, input);

                throw nvae;

            }

            switch (alt25) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:113:2: cond_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_cond_stmt_in_stmt687);
                    cond_stmt59=cond_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, cond_stmt59.getTree());

                    retval.parent = (cond_stmt59!=null?cond_stmt59.parent:null);

                    }
                    break;
                case 2 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:114:5: while_stmt
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_while_stmt_in_stmt698);
                    while_stmt60=while_stmt();

                    state._fsp--;

                    adaptor.addChild(root_0, while_stmt60.getTree());

                    retval.parent = (while_stmt60!=null?while_stmt60.parent:null);

                    }
                    break;
                case 3 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:115:5: 'break' SEMI
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal61=(Token)match(input,46,FOLLOW_46_in_stmt709); 
                    string_literal61_tree = 
                    (CommonTree)adaptor.create(string_literal61)
                    ;
                    adaptor.addChild(root_0, string_literal61_tree);


                    if(whileCounter == 0) {new ErrorOutput(input.LT(1), "Break statement not in while loop.");} retval.parent = new Keyword("break");

                    SEMI62=(Token)match(input,SEMI,FOLLOW_SEMI_in_stmt712); 
                    SEMI62_tree = 
                    (CommonTree)adaptor.create(SEMI62)
                    ;
                    adaptor.addChild(root_0, SEMI62_tree);


                    }
                    break;
                case 4 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:116:5: 'continue' SEMI
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal63=(Token)match(input,47,FOLLOW_47_in_stmt721); 
                    string_literal63_tree = 
                    (CommonTree)adaptor.create(string_literal63)
                    ;
                    adaptor.addChild(root_0, string_literal63_tree);


                    if(whileCounter == 0) {new ErrorOutput(input.LT(1), "Continue statement not in while loop.");}retval.parent = new Keyword("continue");

                    SEMI64=(Token)match(input,SEMI,FOLLOW_SEMI_in_stmt725); 
                    SEMI64_tree = 
                    (CommonTree)adaptor.create(SEMI64)
                    ;
                    adaptor.addChild(root_0, SEMI64_tree);


                    }
                    break;
                case 5 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:117:5: 'return' SEMI
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal65=(Token)match(input,51,FOLLOW_51_in_stmt733); 
                    string_literal65_tree = 
                    (CommonTree)adaptor.create(string_literal65)
                    ;
                    adaptor.addChild(root_0, string_literal65_tree);


                    SEMI66=(Token)match(input,SEMI,FOLLOW_SEMI_in_stmt735); 
                    SEMI66_tree = 
                    (CommonTree)adaptor.create(SEMI66)
                    ;
                    adaptor.addChild(root_0, SEMI66_tree);


                    retval.parent = new Return(new VoidType(true)); currentFunc.peek().checkReturnType(new VoidType(true), (Return)retval.parent, input.LT(1)); 

                    }
                    break;
                case 6 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:118:5: 'return' condition SEMI
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    string_literal67=(Token)match(input,51,FOLLOW_51_in_stmt746); 
                    string_literal67_tree = 
                    (CommonTree)adaptor.create(string_literal67)
                    ;
                    adaptor.addChild(root_0, string_literal67_tree);


                    pushFollow(FOLLOW_condition_in_stmt748);
                    condition68=condition();

                    state._fsp--;

                    adaptor.addChild(root_0, condition68.getTree());

                    retval.parent = new Return((condition68!=null?condition68.parent:null)); currentFunc.peek().checkReturnType((condition68!=null?condition68.type:null), (Return)retval.parent, input.LT(1));

                    SEMI69=(Token)match(input,SEMI,FOLLOW_SEMI_in_stmt752); 
                    SEMI69_tree = 
                    (CommonTree)adaptor.create(SEMI69)
                    ;
                    adaptor.addChild(root_0, SEMI69_tree);


                    }
                    break;
                case 7 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:119:5: expr SEMI
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_expr_in_stmt760);
                    expr70=expr();

                    state._fsp--;

                    adaptor.addChild(root_0, expr70.getTree());

                    retval.parent = (expr70!=null?expr70.parent:null);

                    SEMI71=(Token)match(input,SEMI,FOLLOW_SEMI_in_stmt764); 
                    SEMI71_tree = 
                    (CommonTree)adaptor.create(SEMI71)
                    ;
                    adaptor.addChild(root_0, SEMI71_tree);


                    }
                    break;
                case 8 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:120:5: funct
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_funct_in_stmt772);
                    funct72=funct();

                    state._fsp--;

                    adaptor.addChild(root_0, funct72.getTree());

                    retval.parent = (funct72!=null?funct72.parent:null);

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "stmt"


    public static class cond_stmt_return extends ParserRuleReturnScope {
        public If parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "cond_stmt"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:122:1: cond_stmt returns [If parent] : 'if' LPAR condition RPAR LBRACK s1= varstmt RBRACK ( options {greedy=true; } : 'else' LBRACK s2= varstmt RBRACK )? ;
    public final myGrammarParser.cond_stmt_return cond_stmt() throws RecognitionException {
        myGrammarParser.cond_stmt_return retval = new myGrammarParser.cond_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal73=null;
        Token LPAR74=null;
        Token RPAR76=null;
        Token LBRACK77=null;
        Token RBRACK78=null;
        Token string_literal79=null;
        Token LBRACK80=null;
        Token RBRACK81=null;
        myGrammarParser.varstmt_return s1 =null;

        myGrammarParser.varstmt_return s2 =null;

        myGrammarParser.condition_return condition75 =null;


        CommonTree string_literal73_tree=null;
        CommonTree LPAR74_tree=null;
        CommonTree RPAR76_tree=null;
        CommonTree LBRACK77_tree=null;
        CommonTree RBRACK78_tree=null;
        CommonTree string_literal79_tree=null;
        CommonTree LBRACK80_tree=null;
        CommonTree RBRACK81_tree=null;

        If tmp = null;
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:123:22: ( 'if' LPAR condition RPAR LBRACK s1= varstmt RBRACK ( options {greedy=true; } : 'else' LBRACK s2= varstmt RBRACK )? )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:123:24: 'if' LPAR condition RPAR LBRACK s1= varstmt RBRACK ( options {greedy=true; } : 'else' LBRACK s2= varstmt RBRACK )?
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal73=(Token)match(input,49,FOLLOW_49_in_cond_stmt789); 
            string_literal73_tree = 
            (CommonTree)adaptor.create(string_literal73)
            ;
            adaptor.addChild(root_0, string_literal73_tree);


            LPAR74=(Token)match(input,LPAR,FOLLOW_LPAR_in_cond_stmt791); 
            LPAR74_tree = 
            (CommonTree)adaptor.create(LPAR74)
            ;
            adaptor.addChild(root_0, LPAR74_tree);


            pushFollow(FOLLOW_condition_in_cond_stmt793);
            condition75=condition();

            state._fsp--;

            adaptor.addChild(root_0, condition75.getTree());

            RPAR76=(Token)match(input,RPAR,FOLLOW_RPAR_in_cond_stmt795); 
            RPAR76_tree = 
            (CommonTree)adaptor.create(RPAR76)
            ;
            adaptor.addChild(root_0, RPAR76_tree);


            LBRACK77=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_cond_stmt797); 
            LBRACK77_tree = 
            (CommonTree)adaptor.create(LBRACK77)
            ;
            adaptor.addChild(root_0, LBRACK77_tree);


            symbolTable.setScope(new Scope(symbolTable.getScope()));

            pushFollow(FOLLOW_varstmt_in_cond_stmt803);
            s1=varstmt();

            state._fsp--;

            adaptor.addChild(root_0, s1.getTree());

            RBRACK78=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_cond_stmt805); 
            RBRACK78_tree = 
            (CommonTree)adaptor.create(RBRACK78)
            ;
            adaptor.addChild(root_0, RBRACK78_tree);


            symbolTable.setScope(symbolTable.getScope().getParent());tmp=new If((condition75!=null?condition75.parent:null), (s1!=null?s1.parent:null));

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:123:235: ( options {greedy=true; } : 'else' LBRACK s2= varstmt RBRACK )?
            int alt26=2;
            int LA26_0 = input.LA(1);

            if ( (LA26_0==48) ) {
                alt26=1;
            }
            switch (alt26) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:123:259: 'else' LBRACK s2= varstmt RBRACK
                    {
                    string_literal79=(Token)match(input,48,FOLLOW_48_in_cond_stmt817); 
                    string_literal79_tree = 
                    (CommonTree)adaptor.create(string_literal79)
                    ;
                    adaptor.addChild(root_0, string_literal79_tree);


                    LBRACK80=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_cond_stmt819); 
                    LBRACK80_tree = 
                    (CommonTree)adaptor.create(LBRACK80)
                    ;
                    adaptor.addChild(root_0, LBRACK80_tree);


                    pushFollow(FOLLOW_varstmt_in_cond_stmt823);
                    s2=varstmt();

                    state._fsp--;

                    adaptor.addChild(root_0, s2.getTree());

                    RBRACK81=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_cond_stmt825); 
                    RBRACK81_tree = 
                    (CommonTree)adaptor.create(RBRACK81)
                    ;
                    adaptor.addChild(root_0, RBRACK81_tree);


                    tmp.setElse((s2!=null?s2.parent:null));

                    }
                    break;

            }


            retval.parent = tmp;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "cond_stmt"


    public static class while_stmt_return extends ParserRuleReturnScope {
        public Stmt parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "while_stmt"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:125:1: while_stmt returns [Stmt parent] : 'while' LPAR condition RPAR LBRACK varstmt RBRACK ;
    public final myGrammarParser.while_stmt_return while_stmt() throws RecognitionException {
        myGrammarParser.while_stmt_return retval = new myGrammarParser.while_stmt_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal82=null;
        Token LPAR83=null;
        Token RPAR85=null;
        Token LBRACK86=null;
        Token RBRACK88=null;
        myGrammarParser.condition_return condition84 =null;

        myGrammarParser.varstmt_return varstmt87 =null;


        CommonTree string_literal82_tree=null;
        CommonTree LPAR83_tree=null;
        CommonTree RPAR85_tree=null;
        CommonTree LBRACK86_tree=null;
        CommonTree RBRACK88_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:125:32: ( 'while' LPAR condition RPAR LBRACK varstmt RBRACK )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:125:34: 'while' LPAR condition RPAR LBRACK varstmt RBRACK
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal82=(Token)match(input,53,FOLLOW_53_in_while_stmt841); 
            string_literal82_tree = 
            (CommonTree)adaptor.create(string_literal82)
            ;
            adaptor.addChild(root_0, string_literal82_tree);


            LPAR83=(Token)match(input,LPAR,FOLLOW_LPAR_in_while_stmt843); 
            LPAR83_tree = 
            (CommonTree)adaptor.create(LPAR83)
            ;
            adaptor.addChild(root_0, LPAR83_tree);


            whileCounter++;

            pushFollow(FOLLOW_condition_in_while_stmt847);
            condition84=condition();

            state._fsp--;

            adaptor.addChild(root_0, condition84.getTree());

            RPAR85=(Token)match(input,RPAR,FOLLOW_RPAR_in_while_stmt849); 
            RPAR85_tree = 
            (CommonTree)adaptor.create(RPAR85)
            ;
            adaptor.addChild(root_0, RPAR85_tree);


            LBRACK86=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_while_stmt851); 
            LBRACK86_tree = 
            (CommonTree)adaptor.create(LBRACK86)
            ;
            adaptor.addChild(root_0, LBRACK86_tree);


            symbolTable.setScope(new Scope(symbolTable.getScope()));

            pushFollow(FOLLOW_varstmt_in_while_stmt855);
            varstmt87=varstmt();

            state._fsp--;

            adaptor.addChild(root_0, varstmt87.getTree());

            RBRACK88=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_while_stmt857); 
            RBRACK88_tree = 
            (CommonTree)adaptor.create(RBRACK88)
            ;
            adaptor.addChild(root_0, RBRACK88_tree);


            symbolTable.setScope(symbolTable.getScope().getParent());retval.parent = new While((condition84!=null?condition84.parent:null), (varstmt87!=null?varstmt87.parent:null), input.LT(1)); whileCounter--;

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "while_stmt"


    public static class printf_return extends ParserRuleReturnScope {
        public IntType type;
        public Printf parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "printf"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:127:1: printf returns [IntType type, Printf parent] : 'printf' LPAR STRING_LITERAL ( COMMA condition )* RPAR ;
    public final myGrammarParser.printf_return printf() throws RecognitionException {
        myGrammarParser.printf_return retval = new myGrammarParser.printf_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal89=null;
        Token LPAR90=null;
        Token STRING_LITERAL91=null;
        Token COMMA92=null;
        Token RPAR94=null;
        myGrammarParser.condition_return condition93 =null;


        CommonTree string_literal89_tree=null;
        CommonTree LPAR90_tree=null;
        CommonTree STRING_LITERAL91_tree=null;
        CommonTree COMMA92_tree=null;
        CommonTree RPAR94_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:127:45: ( 'printf' LPAR STRING_LITERAL ( COMMA condition )* RPAR )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:127:47: 'printf' LPAR STRING_LITERAL ( COMMA condition )* RPAR
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal89=(Token)match(input,50,FOLLOW_50_in_printf870); 
            string_literal89_tree = 
            (CommonTree)adaptor.create(string_literal89)
            ;
            adaptor.addChild(root_0, string_literal89_tree);


            LPAR90=(Token)match(input,LPAR,FOLLOW_LPAR_in_printf872); 
            LPAR90_tree = 
            (CommonTree)adaptor.create(LPAR90)
            ;
            adaptor.addChild(root_0, LPAR90_tree);


            STRING_LITERAL91=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_printf874); 
            STRING_LITERAL91_tree = 
            (CommonTree)adaptor.create(STRING_LITERAL91)
            ;
            adaptor.addChild(root_0, STRING_LITERAL91_tree);


            retval.parent = new Printf((STRING_LITERAL91!=null?STRING_LITERAL91.getText():null)); retval.type = new IntType(true);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:127:149: ( COMMA condition )*
            loop27:
            do {
                int alt27=2;
                int LA27_0 = input.LA(1);

                if ( (LA27_0==COMMA) ) {
                    alt27=1;
                }


                switch (alt27) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:127:150: COMMA condition
            	    {
            	    COMMA92=(Token)match(input,COMMA,FOLLOW_COMMA_in_printf879); 
            	    COMMA92_tree = 
            	    (CommonTree)adaptor.create(COMMA92)
            	    ;
            	    adaptor.addChild(root_0, COMMA92_tree);


            	    pushFollow(FOLLOW_condition_in_printf881);
            	    condition93=condition();

            	    state._fsp--;

            	    adaptor.addChild(root_0, condition93.getTree());

            	    retval.parent.addNode((condition93!=null?condition93.parent:null));

            	    }
            	    break;

            	default :
            	    break loop27;
                }
            } while (true);


            RPAR94=(Token)match(input,RPAR,FOLLOW_RPAR_in_printf887); 
            RPAR94_tree = 
            (CommonTree)adaptor.create(RPAR94)
            ;
            adaptor.addChild(root_0, RPAR94_tree);


            retval.parent.checkParameters(input.LT(1), stdioIncluded);

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "printf"


    public static class scanf_return extends ParserRuleReturnScope {
        public IntType type;
        public Scanf parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "scanf"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:129:1: scanf returns [IntType type, Scanf parent] : 'scanf' LPAR STRING_LITERAL ( COMMA ident )* RPAR ;
    public final myGrammarParser.scanf_return scanf() throws RecognitionException {
        myGrammarParser.scanf_return retval = new myGrammarParser.scanf_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal95=null;
        Token LPAR96=null;
        Token STRING_LITERAL97=null;
        Token COMMA98=null;
        Token RPAR100=null;
        myGrammarParser.ident_return ident99 =null;


        CommonTree string_literal95_tree=null;
        CommonTree LPAR96_tree=null;
        CommonTree STRING_LITERAL97_tree=null;
        CommonTree COMMA98_tree=null;
        CommonTree RPAR100_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:129:43: ( 'scanf' LPAR STRING_LITERAL ( COMMA ident )* RPAR )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:129:45: 'scanf' LPAR STRING_LITERAL ( COMMA ident )* RPAR
            {
            root_0 = (CommonTree)adaptor.nil();


            string_literal95=(Token)match(input,52,FOLLOW_52_in_scanf900); 
            string_literal95_tree = 
            (CommonTree)adaptor.create(string_literal95)
            ;
            adaptor.addChild(root_0, string_literal95_tree);


            LPAR96=(Token)match(input,LPAR,FOLLOW_LPAR_in_scanf902); 
            LPAR96_tree = 
            (CommonTree)adaptor.create(LPAR96)
            ;
            adaptor.addChild(root_0, LPAR96_tree);


            STRING_LITERAL97=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_scanf904); 
            STRING_LITERAL97_tree = 
            (CommonTree)adaptor.create(STRING_LITERAL97)
            ;
            adaptor.addChild(root_0, STRING_LITERAL97_tree);


            retval.parent = new Scanf((STRING_LITERAL97!=null?STRING_LITERAL97.getText():null)); retval.type = new IntType(true);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:129:145: ( COMMA ident )*
            loop28:
            do {
                int alt28=2;
                int LA28_0 = input.LA(1);

                if ( (LA28_0==COMMA) ) {
                    alt28=1;
                }


                switch (alt28) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:129:146: COMMA ident
            	    {
            	    COMMA98=(Token)match(input,COMMA,FOLLOW_COMMA_in_scanf909); 
            	    COMMA98_tree = 
            	    (CommonTree)adaptor.create(COMMA98)
            	    ;
            	    adaptor.addChild(root_0, COMMA98_tree);


            	    pushFollow(FOLLOW_ident_in_scanf911);
            	    ident99=ident();

            	    state._fsp--;

            	    adaptor.addChild(root_0, ident99.getTree());

            	    retval.parent.addIdentifier(new Identifier((ident99!=null?input.toString(ident99.start,ident99.stop):null)));

            	    }
            	    break;

            	default :
            	    break loop28;
                }
            } while (true);


            RPAR100=(Token)match(input,RPAR,FOLLOW_RPAR_in_scanf917); 
            RPAR100_tree = 
            (CommonTree)adaptor.create(RPAR100)
            ;
            adaptor.addChild(root_0, RPAR100_tree);


            retval.parent.checkParameters(input.LT(1), stdioIncluded);

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "scanf"


    public static class funccall_return extends ParserRuleReturnScope {
        public Type type;
        public FuncCall parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "funccall"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:131:1: funccall returns [Type type, FuncCall parent] : IDENT LPAR (e1= condition ( COMMA e2= condition )* )? RPAR ;
    public final myGrammarParser.funccall_return funccall() throws RecognitionException {
        myGrammarParser.funccall_return retval = new myGrammarParser.funccall_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token IDENT101=null;
        Token LPAR102=null;
        Token COMMA103=null;
        Token RPAR104=null;
        myGrammarParser.condition_return e1 =null;

        myGrammarParser.condition_return e2 =null;


        CommonTree IDENT101_tree=null;
        CommonTree LPAR102_tree=null;
        CommonTree COMMA103_tree=null;
        CommonTree RPAR104_tree=null;

         Vector<Param> parameters = new Vector<Param>(); 
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:132:58: ( IDENT LPAR (e1= condition ( COMMA e2= condition )* )? RPAR )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:133:1: IDENT LPAR (e1= condition ( COMMA e2= condition )* )? RPAR
            {
            root_0 = (CommonTree)adaptor.nil();


            IDENT101=(Token)match(input,IDENT,FOLLOW_IDENT_in_funccall936); 
            IDENT101_tree = 
            (CommonTree)adaptor.create(IDENT101)
            ;
            adaptor.addChild(root_0, IDENT101_tree);


            retval.type = symbolTable.resolveFunction((IDENT101!=null?IDENT101.getText():null), input.LT(1)).getReturnType(); symbolTable.checkFunctionBody(input.LT(1), (IDENT101!=null?IDENT101.getText():null));

            LPAR102=(Token)match(input,LPAR,FOLLOW_LPAR_in_funccall941); 
            LPAR102_tree = 
            (CommonTree)adaptor.create(LPAR102)
            ;
            adaptor.addChild(root_0, LPAR102_tree);


            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:134:6: (e1= condition ( COMMA e2= condition )* )?
            int alt30=2;
            int LA30_0 = input.LA(1);

            if ( (LA30_0==CHAR_LITERAL||LA30_0==IDENT||LA30_0==INTEGER||LA30_0==LPAR||LA30_0==REAL||LA30_0==31||LA30_0==37||LA30_0==50||LA30_0==52) ) {
                alt30=1;
            }
            switch (alt30) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:134:7: e1= condition ( COMMA e2= condition )*
                    {
                    pushFollow(FOLLOW_condition_in_funccall946);
                    e1=condition();

                    state._fsp--;

                    adaptor.addChild(root_0, e1.getTree());

                    parameters.add(new Param((e1!=null?e1.parent:null)));

                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:135:2: ( COMMA e2= condition )*
                    loop29:
                    do {
                        int alt29=2;
                        int LA29_0 = input.LA(1);

                        if ( (LA29_0==COMMA) ) {
                            alt29=1;
                        }


                        switch (alt29) {
                    	case 1 :
                    	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:135:2: COMMA e2= condition
                    	    {
                    	    COMMA103=(Token)match(input,COMMA,FOLLOW_COMMA_in_funccall952); 
                    	    COMMA103_tree = 
                    	    (CommonTree)adaptor.create(COMMA103)
                    	    ;
                    	    adaptor.addChild(root_0, COMMA103_tree);


                    	    pushFollow(FOLLOW_condition_in_funccall956);
                    	    e2=condition();

                    	    state._fsp--;

                    	    adaptor.addChild(root_0, e2.getTree());

                    	    parameters.add(new Param((e2!=null?e2.parent:null)));

                    	    }
                    	    break;

                    	default :
                    	    break loop29;
                        }
                    } while (true);


                    }
                    break;

            }


            retval.parent = new FuncCall(new Identifier((IDENT101!=null?IDENT101.getText():null)), parameters, symbolTable.resolveFunction((IDENT101!=null?IDENT101.getText():null), input.LT(1))); symbolTable.resolveFunction((IDENT101!=null?IDENT101.getText():null), input.LT(1)).checkParameters(parameters, input.LT(1), true);

            RPAR104=(Token)match(input,RPAR,FOLLOW_RPAR_in_funccall966); 
            RPAR104_tree = 
            (CommonTree)adaptor.create(RPAR104)
            ;
            adaptor.addChild(root_0, RPAR104_tree);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "funccall"


    public static class expr_return extends ParserRuleReturnScope {
        public Type type;
        public Stmt parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "expr"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:138:1: expr returns [Type type, Stmt parent] : ( ident EQUAL e1= condition | condition );
    public final myGrammarParser.expr_return expr() throws RecognitionException {
        myGrammarParser.expr_return retval = new myGrammarParser.expr_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token EQUAL106=null;
        myGrammarParser.condition_return e1 =null;

        myGrammarParser.ident_return ident105 =null;

        myGrammarParser.condition_return condition107 =null;


        CommonTree EQUAL106_tree=null;

        Type c = null;
        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:139:23: ( ident EQUAL e1= condition | condition )
            int alt31=2;
            int LA31_0 = input.LA(1);

            if ( (LA31_0==IDENT) ) {
                int LA31_1 = input.LA(2);

                if ( (LA31_1==EQUAL) ) {
                    alt31=1;
                }
                else if ( (LA31_1==LPAR||LA31_1==QMARK||LA31_1==SEMI||(LA31_1 >= 32 && LA31_1 <= 43)||LA31_1==54) ) {
                    alt31=2;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 31, 1, input);

                    throw nvae;

                }
            }
            else if ( (LA31_0==CHAR_LITERAL||LA31_0==INTEGER||LA31_0==LPAR||LA31_0==REAL||LA31_0==31||LA31_0==37||LA31_0==50||LA31_0==52) ) {
                alt31=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 31, 0, input);

                throw nvae;

            }
            switch (alt31) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:140:2: ident EQUAL e1= condition
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_ident_in_expr985);
                    ident105=ident();

                    state._fsp--;

                    adaptor.addChild(root_0, ident105.getTree());

                    EQUAL106=(Token)match(input,EQUAL,FOLLOW_EQUAL_in_expr987); 
                    EQUAL106_tree = 
                    (CommonTree)adaptor.create(EQUAL106)
                    ;
                    adaptor.addChild(root_0, EQUAL106_tree);


                    pushFollow(FOLLOW_condition_in_expr991);
                    e1=condition();

                    state._fsp--;

                    adaptor.addChild(root_0, e1.getTree());

                    retval.type = (e1!=null?e1.type:null); symbolTable.checkTypes((ident105!=null?ident105.type:null), (e1!=null?e1.type:null), false, input.LT(1)); retval.parent =new Var((ident105!=null?ident105.type:null), new Identifier((ident105!=null?ident105.name:null), input.LT(1), symbolTable.getScope()), (e1!=null?e1.parent:null));

                    }
                    break;
                case 2 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:141:4: condition
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_condition_in_expr998);
                    condition107=condition();

                    state._fsp--;

                    adaptor.addChild(root_0, condition107.getTree());

                    retval.type = (condition107!=null?condition107.type:null); retval.parent = (condition107!=null?condition107.parent:null);

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "expr"


    public static class condition_return extends ParserRuleReturnScope {
        public Type type;
        public Condition parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "condition"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:143:1: condition returns [Type type, Condition parent] : disjunction ( options {greedy=true; } : QMARK e1= condition DPOINT e2= condition )* ;
    public final myGrammarParser.condition_return condition() throws RecognitionException {
        myGrammarParser.condition_return retval = new myGrammarParser.condition_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token QMARK109=null;
        Token DPOINT110=null;
        myGrammarParser.condition_return e1 =null;

        myGrammarParser.condition_return e2 =null;

        myGrammarParser.disjunction_return disjunction108 =null;


        CommonTree QMARK109_tree=null;
        CommonTree DPOINT110_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:143:48: ( disjunction ( options {greedy=true; } : QMARK e1= condition DPOINT e2= condition )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:143:50: disjunction ( options {greedy=true; } : QMARK e1= condition DPOINT e2= condition )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_disjunction_in_condition1012);
            disjunction108=disjunction();

            state._fsp--;

            adaptor.addChild(root_0, disjunction108.getTree());

            retval.type = (disjunction108!=null?disjunction108.type:null); retval.parent = (disjunction108!=null?disjunction108.parent:null);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:143:122: ( options {greedy=true; } : QMARK e1= condition DPOINT e2= condition )*
            loop32:
            do {
                int alt32=2;
                int LA32_0 = input.LA(1);

                if ( (LA32_0==QMARK) ) {
                    alt32=1;
                }


                switch (alt32) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:144:3: QMARK e1= condition DPOINT e2= condition
            	    {
            	    QMARK109=(Token)match(input,QMARK,FOLLOW_QMARK_in_condition1028); 
            	    QMARK109_tree = 
            	    (CommonTree)adaptor.create(QMARK109)
            	    ;
            	    adaptor.addChild(root_0, QMARK109_tree);


            	    pushFollow(FOLLOW_condition_in_condition1032);
            	    e1=condition();

            	    state._fsp--;

            	    adaptor.addChild(root_0, e1.getTree());

            	    retval.type = (e1!=null?e1.type:null);

            	    DPOINT110=(Token)match(input,DPOINT,FOLLOW_DPOINT_in_condition1036); 
            	    DPOINT110_tree = 
            	    (CommonTree)adaptor.create(DPOINT110)
            	    ;
            	    adaptor.addChild(root_0, DPOINT110_tree);


            	    pushFollow(FOLLOW_condition_in_condition1040);
            	    e2=condition();

            	    state._fsp--;

            	    adaptor.addChild(root_0, e2.getTree());

            	    retval.type = (e2!=null?e2.type:null); retval.parent = new Condition((disjunction108!=null?disjunction108.parent:null), (e1!=null?e1.parent:null), (e2!=null?e2.parent:null));

            	    }
            	    break;

            	default :
            	    break loop32;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "condition"


    public static class disjunction_return extends ParserRuleReturnScope {
        public Type type;
        public Term parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "disjunction"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:146:1: disjunction returns [Type type, Term parent] : c1= conjunction ( '||' c2= conjunction )* ;
    public final myGrammarParser.disjunction_return disjunction() throws RecognitionException {
        myGrammarParser.disjunction_return retval = new myGrammarParser.disjunction_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal111=null;
        myGrammarParser.conjunction_return c1 =null;

        myGrammarParser.conjunction_return c2 =null;


        CommonTree string_literal111_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:146:45: (c1= conjunction ( '||' c2= conjunction )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:146:47: c1= conjunction ( '||' c2= conjunction )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_conjunction_in_disjunction1057);
            c1=conjunction();

            state._fsp--;

            adaptor.addChild(root_0, c1.getTree());

            retval.type = (c1!=null?c1.type:null); retval.parent = (c1!=null?c1.parent:null);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:147:3: ( '||' c2= conjunction )*
            loop33:
            do {
                int alt33=2;
                int LA33_0 = input.LA(1);

                if ( (LA33_0==54) ) {
                    alt33=1;
                }


                switch (alt33) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:147:4: '||' c2= conjunction
            	    {
            	    string_literal111=(Token)match(input,54,FOLLOW_54_in_disjunction1065); 
            	    string_literal111_tree = 
            	    (CommonTree)adaptor.create(string_literal111)
            	    ;
            	    adaptor.addChild(root_0, string_literal111_tree);


            	    pushFollow(FOLLOW_conjunction_in_disjunction1069);
            	    c2=conjunction();

            	    state._fsp--;

            	    adaptor.addChild(root_0, c2.getTree());

            	    retval.type = (c2!=null?c2.type:null); retval.parent = new Term((c1!=null?c1.parent:null), (c2!=null?c2.parent:null), "||");

            	    }
            	    break;

            	default :
            	    break loop33;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "disjunction"


    public static class conjunction_return extends ParserRuleReturnScope {
        public Type type;
        public Term parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "conjunction"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:149:1: conjunction returns [Type type, Term parent] : c1= comparison ( '&&' c2= comparison )* ;
    public final myGrammarParser.conjunction_return conjunction() throws RecognitionException {
        myGrammarParser.conjunction_return retval = new myGrammarParser.conjunction_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal112=null;
        myGrammarParser.comparison_return c1 =null;

        myGrammarParser.comparison_return c2 =null;


        CommonTree string_literal112_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:149:45: (c1= comparison ( '&&' c2= comparison )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:149:47: c1= comparison ( '&&' c2= comparison )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_comparison_in_conjunction1086);
            c1=comparison();

            state._fsp--;

            adaptor.addChild(root_0, c1.getTree());

            retval.type = (c1!=null?c1.type:null); retval.parent = (c1!=null?c1.parent:null);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:150:3: ( '&&' c2= comparison )*
            loop34:
            do {
                int alt34=2;
                int LA34_0 = input.LA(1);

                if ( (LA34_0==34) ) {
                    alt34=1;
                }


                switch (alt34) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:150:4: '&&' c2= comparison
            	    {
            	    string_literal112=(Token)match(input,34,FOLLOW_34_in_conjunction1094); 
            	    string_literal112_tree = 
            	    (CommonTree)adaptor.create(string_literal112)
            	    ;
            	    adaptor.addChild(root_0, string_literal112_tree);


            	    pushFollow(FOLLOW_comparison_in_conjunction1098);
            	    c2=comparison();

            	    state._fsp--;

            	    adaptor.addChild(root_0, c2.getTree());

            	    retval.type = (c2!=null?c2.type:null);retval.parent = new Term((c1!=null?c1.parent:null), (c2!=null?c2.parent:null), "&&");

            	    }
            	    break;

            	default :
            	    break loop34;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "conjunction"


    public static class comparison_return extends ParserRuleReturnScope {
        public Type type;
        public Term parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "comparison"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:152:1: comparison returns [Type type, Term parent] : r1= relation ( '!=' r3= relation | '==' r2= relation )* ;
    public final myGrammarParser.comparison_return comparison() throws RecognitionException {
        myGrammarParser.comparison_return retval = new myGrammarParser.comparison_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token string_literal113=null;
        Token string_literal114=null;
        myGrammarParser.relation_return r1 =null;

        myGrammarParser.relation_return r3 =null;

        myGrammarParser.relation_return r2 =null;


        CommonTree string_literal113_tree=null;
        CommonTree string_literal114_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:152:44: (r1= relation ( '!=' r3= relation | '==' r2= relation )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:152:46: r1= relation ( '!=' r3= relation | '==' r2= relation )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_relation_in_comparison1115);
            r1=relation();

            state._fsp--;

            adaptor.addChild(root_0, r1.getTree());

            retval.type = (r1!=null?r1.type:null); retval.parent = (r1!=null?r1.parent:null);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:153:3: ( '!=' r3= relation | '==' r2= relation )*
            loop35:
            do {
                int alt35=3;
                int LA35_0 = input.LA(1);

                if ( (LA35_0==32) ) {
                    alt35=1;
                }
                else if ( (LA35_0==41) ) {
                    alt35=2;
                }


                switch (alt35) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:153:5: '!=' r3= relation
            	    {
            	    string_literal113=(Token)match(input,32,FOLLOW_32_in_comparison1124); 
            	    string_literal113_tree = 
            	    (CommonTree)adaptor.create(string_literal113)
            	    ;
            	    adaptor.addChild(root_0, string_literal113_tree);


            	    pushFollow(FOLLOW_relation_in_comparison1128);
            	    r3=relation();

            	    state._fsp--;

            	    adaptor.addChild(root_0, r3.getTree());

            	    retval.type = (r3!=null?r3.type:null); retval.parent = new Term((r1!=null?r1.parent:null), (r3!=null?r3.parent:null), "!=");

            	    }
            	    break;
            	case 2 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:154:5: '==' r2= relation
            	    {
            	    string_literal114=(Token)match(input,41,FOLLOW_41_in_comparison1136); 
            	    string_literal114_tree = 
            	    (CommonTree)adaptor.create(string_literal114)
            	    ;
            	    adaptor.addChild(root_0, string_literal114_tree);


            	    pushFollow(FOLLOW_relation_in_comparison1140);
            	    r2=relation();

            	    state._fsp--;

            	    adaptor.addChild(root_0, r2.getTree());

            	    retval.type = (r2!=null?r2.type:null); retval.parent = new Term((r1!=null?r1.parent:null), (r2!=null?r2.parent:null), "==");

            	    }
            	    break;

            	default :
            	    break loop35;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "comparison"


    public static class relation_return extends ParserRuleReturnScope {
        public Type type;
        public Term parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "relation"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:156:1: relation returns [Type type, Term parent] : s1= sum ( '<' s2= sum | '<=' s4= sum | '>' s3= sum | '>=' s5= sum )* ;
    public final myGrammarParser.relation_return relation() throws RecognitionException {
        myGrammarParser.relation_return retval = new myGrammarParser.relation_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token char_literal115=null;
        Token string_literal116=null;
        Token char_literal117=null;
        Token string_literal118=null;
        myGrammarParser.sum_return s1 =null;

        myGrammarParser.sum_return s2 =null;

        myGrammarParser.sum_return s4 =null;

        myGrammarParser.sum_return s3 =null;

        myGrammarParser.sum_return s5 =null;


        CommonTree char_literal115_tree=null;
        CommonTree string_literal116_tree=null;
        CommonTree char_literal117_tree=null;
        CommonTree string_literal118_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:156:42: (s1= sum ( '<' s2= sum | '<=' s4= sum | '>' s3= sum | '>=' s5= sum )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:156:44: s1= sum ( '<' s2= sum | '<=' s4= sum | '>' s3= sum | '>=' s5= sum )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_sum_in_relation1157);
            s1=sum();

            state._fsp--;

            adaptor.addChild(root_0, s1.getTree());

            retval.type = (s1!=null?s1.type:null); retval.parent = (s1!=null?s1.parent:null);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:157:3: ( '<' s2= sum | '<=' s4= sum | '>' s3= sum | '>=' s5= sum )*
            loop36:
            do {
                int alt36=5;
                switch ( input.LA(1) ) {
                case 39:
                    {
                    alt36=1;
                    }
                    break;
                case 40:
                    {
                    alt36=2;
                    }
                    break;
                case 42:
                    {
                    alt36=3;
                    }
                    break;
                case 43:
                    {
                    alt36=4;
                    }
                    break;

                }

                switch (alt36) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:157:4: '<' s2= sum
            	    {
            	    char_literal115=(Token)match(input,39,FOLLOW_39_in_relation1165); 
            	    char_literal115_tree = 
            	    (CommonTree)adaptor.create(char_literal115)
            	    ;
            	    adaptor.addChild(root_0, char_literal115_tree);


            	    pushFollow(FOLLOW_sum_in_relation1169);
            	    s2=sum();

            	    state._fsp--;

            	    adaptor.addChild(root_0, s2.getTree());

            	    retval.type = (s2!=null?s2.type:null);retval.parent = new Term((s1!=null?s1.parent:null), (s2!=null?s2.parent:null), "<");

            	    }
            	    break;
            	case 2 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:158:5: '<=' s4= sum
            	    {
            	    string_literal116=(Token)match(input,40,FOLLOW_40_in_relation1178); 
            	    string_literal116_tree = 
            	    (CommonTree)adaptor.create(string_literal116)
            	    ;
            	    adaptor.addChild(root_0, string_literal116_tree);


            	    pushFollow(FOLLOW_sum_in_relation1182);
            	    s4=sum();

            	    state._fsp--;

            	    adaptor.addChild(root_0, s4.getTree());

            	    retval.type = (s4!=null?s4.type:null);retval.parent = new Term((s1!=null?s1.parent:null), (s4!=null?s4.parent:null), "<=");

            	    }
            	    break;
            	case 3 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:159:5: '>' s3= sum
            	    {
            	    char_literal117=(Token)match(input,42,FOLLOW_42_in_relation1190); 
            	    char_literal117_tree = 
            	    (CommonTree)adaptor.create(char_literal117)
            	    ;
            	    adaptor.addChild(root_0, char_literal117_tree);


            	    pushFollow(FOLLOW_sum_in_relation1194);
            	    s3=sum();

            	    state._fsp--;

            	    adaptor.addChild(root_0, s3.getTree());

            	    retval.type = (s3!=null?s3.type:null);retval.parent = new Term((s1!=null?s1.parent:null), (s3!=null?s3.parent:null), ">");

            	    }
            	    break;
            	case 4 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:160:5: '>=' s5= sum
            	    {
            	    string_literal118=(Token)match(input,43,FOLLOW_43_in_relation1202); 
            	    string_literal118_tree = 
            	    (CommonTree)adaptor.create(string_literal118)
            	    ;
            	    adaptor.addChild(root_0, string_literal118_tree);


            	    pushFollow(FOLLOW_sum_in_relation1206);
            	    s5=sum();

            	    state._fsp--;

            	    adaptor.addChild(root_0, s5.getTree());

            	    retval.type = (s5!=null?s5.type:null);retval.parent = new Term((s1!=null?s1.parent:null), (s5!=null?s5.parent:null), ">=");

            	    }
            	    break;

            	default :
            	    break loop36;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "relation"


    public static class sum_return extends ParserRuleReturnScope {
        public Type type;
        public Term parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "sum"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:162:1: sum returns [Type type, Term parent] : t1= term ( '+' t2= term | '-' t3= term )* ;
    public final myGrammarParser.sum_return sum() throws RecognitionException {
        myGrammarParser.sum_return retval = new myGrammarParser.sum_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token char_literal119=null;
        Token char_literal120=null;
        myGrammarParser.term_return t1 =null;

        myGrammarParser.term_return t2 =null;

        myGrammarParser.term_return t3 =null;


        CommonTree char_literal119_tree=null;
        CommonTree char_literal120_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:162:37: (t1= term ( '+' t2= term | '-' t3= term )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:162:39: t1= term ( '+' t2= term | '-' t3= term )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_term_in_sum1223);
            t1=term();

            state._fsp--;

            adaptor.addChild(root_0, t1.getTree());

            retval.type = (t1!=null?t1.type:null); retval.parent = (t1!=null?t1.parent:null);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:163:2: ( '+' t2= term | '-' t3= term )*
            loop37:
            do {
                int alt37=3;
                int LA37_0 = input.LA(1);

                if ( (LA37_0==36) ) {
                    alt37=1;
                }
                else if ( (LA37_0==37) ) {
                    alt37=2;
                }


                switch (alt37) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:163:3: '+' t2= term
            	    {
            	    char_literal119=(Token)match(input,36,FOLLOW_36_in_sum1230); 
            	    char_literal119_tree = 
            	    (CommonTree)adaptor.create(char_literal119)
            	    ;
            	    adaptor.addChild(root_0, char_literal119_tree);


            	    pushFollow(FOLLOW_term_in_sum1234);
            	    t2=term();

            	    state._fsp--;

            	    adaptor.addChild(root_0, t2.getTree());

            	    retval.type = (t2!=null?t2.type:null); if(retval.parent instanceof Term) { retval.parent = new Term(retval.parent, (t2!=null?t2.parent:null), "+"); } else { retval.parent = new Term((t1!=null?t1.parent:null), (t2!=null?t2.parent:null), "+");}

            	    }
            	    break;
            	case 2 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:164:4: '-' t3= term
            	    {
            	    char_literal120=(Token)match(input,37,FOLLOW_37_in_sum1241); 
            	    char_literal120_tree = 
            	    (CommonTree)adaptor.create(char_literal120)
            	    ;
            	    adaptor.addChild(root_0, char_literal120_tree);


            	    pushFollow(FOLLOW_term_in_sum1245);
            	    t3=term();

            	    state._fsp--;

            	    adaptor.addChild(root_0, t3.getTree());

            	    retval.type = (t3!=null?t3.type:null); if(retval.parent instanceof Term) { retval.parent = new Term(retval.parent, (t3!=null?t3.parent:null), "-"); } else {retval.parent = new Term((t1!=null?t1.parent:null), (t3!=null?t3.parent:null), "-");}

            	    }
            	    break;

            	default :
            	    break loop37;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "sum"


    public static class term_return extends ParserRuleReturnScope {
        public Type type;
        public Term parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "term"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:166:1: term returns [Type type, Term parent] : f1= factor ( '*' f2= factor | '/' f3= factor | '%' f4= factor )* ;
    public final myGrammarParser.term_return term() throws RecognitionException {
        myGrammarParser.term_return retval = new myGrammarParser.term_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token char_literal121=null;
        Token char_literal122=null;
        Token char_literal123=null;
        myGrammarParser.factor_return f1 =null;

        myGrammarParser.factor_return f2 =null;

        myGrammarParser.factor_return f3 =null;

        myGrammarParser.factor_return f4 =null;


        CommonTree char_literal121_tree=null;
        CommonTree char_literal122_tree=null;
        CommonTree char_literal123_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:166:38: (f1= factor ( '*' f2= factor | '/' f3= factor | '%' f4= factor )* )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:166:40: f1= factor ( '*' f2= factor | '/' f3= factor | '%' f4= factor )*
            {
            root_0 = (CommonTree)adaptor.nil();


            pushFollow(FOLLOW_factor_in_term1262);
            f1=factor();

            state._fsp--;

            adaptor.addChild(root_0, f1.getTree());

            retval.type = (f1!=null?f1.type:null); retval.parent = (f1!=null?f1.parent:null);

            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:167:2: ( '*' f2= factor | '/' f3= factor | '%' f4= factor )*
            loop38:
            do {
                int alt38=4;
                switch ( input.LA(1) ) {
                case 35:
                    {
                    alt38=1;
                    }
                    break;
                case 38:
                    {
                    alt38=2;
                    }
                    break;
                case 33:
                    {
                    alt38=3;
                    }
                    break;

                }

                switch (alt38) {
            	case 1 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:167:3: '*' f2= factor
            	    {
            	    char_literal121=(Token)match(input,35,FOLLOW_35_in_term1269); 
            	    char_literal121_tree = 
            	    (CommonTree)adaptor.create(char_literal121)
            	    ;
            	    adaptor.addChild(root_0, char_literal121_tree);


            	    pushFollow(FOLLOW_factor_in_term1273);
            	    f2=factor();

            	    state._fsp--;

            	    adaptor.addChild(root_0, f2.getTree());

            	    retval.type = (f2!=null?f2.type:null); if(retval.parent instanceof Term) { retval.parent = new Term(retval.parent, (f2!=null?f2.parent:null), "*"); } else { retval.parent = new Term((f1!=null?f1.parent:null), (f2!=null?f2.parent:null), "*"); }

            	    }
            	    break;
            	case 2 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:168:4: '/' f3= factor
            	    {
            	    char_literal122=(Token)match(input,38,FOLLOW_38_in_term1281); 
            	    char_literal122_tree = 
            	    (CommonTree)adaptor.create(char_literal122)
            	    ;
            	    adaptor.addChild(root_0, char_literal122_tree);


            	    pushFollow(FOLLOW_factor_in_term1285);
            	    f3=factor();

            	    state._fsp--;

            	    adaptor.addChild(root_0, f3.getTree());

            	    retval.type = (f3!=null?f3.type:null); if(retval.parent instanceof Term) { retval.parent = new Term(retval.parent, (f3!=null?f3.parent:null), "/"); } else { retval.parent = new Term((f1!=null?f1.parent:null), (f3!=null?f3.parent:null), "/"); }

            	    }
            	    break;
            	case 3 :
            	    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:169:4: '%' f4= factor
            	    {
            	    char_literal123=(Token)match(input,33,FOLLOW_33_in_term1293); 
            	    char_literal123_tree = 
            	    (CommonTree)adaptor.create(char_literal123)
            	    ;
            	    adaptor.addChild(root_0, char_literal123_tree);


            	    pushFollow(FOLLOW_factor_in_term1297);
            	    f4=factor();

            	    state._fsp--;

            	    adaptor.addChild(root_0, f4.getTree());

            	    retval.type = (f4!=null?f4.type:null); if(retval.parent instanceof Term) { retval.parent = new Term(retval.parent, (f4!=null?f4.parent:null), "%"); } else { retval.parent = new Term((f1!=null?f1.parent:null), (f4!=null?f4.parent:null), "%"); }

            	    }
            	    break;

            	default :
            	    break loop38;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "term"


    public static class factor_return extends ParserRuleReturnScope {
        public Type type;
        public Factor parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "factor"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:171:1: factor returns [Type type, Factor parent] : ( '!' f1= factor | '-' f2= factor | LPAR p2= primary_type RPAR f3= factor | LPAR condition RPAR |p1= primary | expr_f );
    public final myGrammarParser.factor_return factor() throws RecognitionException {
        myGrammarParser.factor_return retval = new myGrammarParser.factor_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token char_literal124=null;
        Token char_literal125=null;
        Token LPAR126=null;
        Token RPAR127=null;
        Token LPAR128=null;
        Token RPAR130=null;
        myGrammarParser.factor_return f1 =null;

        myGrammarParser.factor_return f2 =null;

        myGrammarParser.primary_type_return p2 =null;

        myGrammarParser.factor_return f3 =null;

        myGrammarParser.primary_return p1 =null;

        myGrammarParser.condition_return condition129 =null;

        myGrammarParser.expr_f_return expr_f131 =null;


        CommonTree char_literal124_tree=null;
        CommonTree char_literal125_tree=null;
        CommonTree LPAR126_tree=null;
        CommonTree RPAR127_tree=null;
        CommonTree LPAR128_tree=null;
        CommonTree RPAR130_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:171:41: ( '!' f1= factor | '-' f2= factor | LPAR p2= primary_type RPAR f3= factor | LPAR condition RPAR |p1= primary | expr_f )
            int alt39=6;
            switch ( input.LA(1) ) {
            case 31:
                {
                alt39=1;
                }
                break;
            case 37:
                {
                alt39=2;
                }
                break;
            case LPAR:
                {
                int LA39_3 = input.LA(2);

                if ( (LA39_3==CHAR||LA39_3==FLOAT||LA39_3==INT) ) {
                    alt39=3;
                }
                else if ( (LA39_3==CHAR_LITERAL||LA39_3==IDENT||LA39_3==INTEGER||LA39_3==LPAR||LA39_3==REAL||LA39_3==31||LA39_3==37||LA39_3==50||LA39_3==52) ) {
                    alt39=4;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 39, 3, input);

                    throw nvae;

                }
                }
                break;
            case CHAR_LITERAL:
            case INTEGER:
            case REAL:
                {
                alt39=5;
                }
                break;
            case IDENT:
                {
                int LA39_5 = input.LA(2);

                if ( (LA39_5==COMMA||LA39_5==DPOINT||(LA39_5 >= QMARK && LA39_5 <= RBRACK)||(LA39_5 >= RPAR && LA39_5 <= SEMI)||(LA39_5 >= 32 && LA39_5 <= 43)||LA39_5==54) ) {
                    alt39=5;
                }
                else if ( (LA39_5==LPAR) ) {
                    alt39=6;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 39, 5, input);

                    throw nvae;

                }
                }
                break;
            case 50:
            case 52:
                {
                alt39=6;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 39, 0, input);

                throw nvae;

            }

            switch (alt39) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:172:2: '!' f1= factor
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    char_literal124=(Token)match(input,31,FOLLOW_31_in_factor1313); 
                    char_literal124_tree = 
                    (CommonTree)adaptor.create(char_literal124)
                    ;
                    adaptor.addChild(root_0, char_literal124_tree);


                    pushFollow(FOLLOW_factor_in_factor1317);
                    f1=factor();

                    state._fsp--;

                    adaptor.addChild(root_0, f1.getTree());

                    retval.type = (f1!=null?f1.type:null); retval.parent = new Factor((f1!=null?f1.type:null), "!");

                    }
                    break;
                case 2 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:173:4: '-' f2= factor
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    char_literal125=(Token)match(input,37,FOLLOW_37_in_factor1325); 
                    char_literal125_tree = 
                    (CommonTree)adaptor.create(char_literal125)
                    ;
                    adaptor.addChild(root_0, char_literal125_tree);


                    pushFollow(FOLLOW_factor_in_factor1329);
                    f2=factor();

                    state._fsp--;

                    adaptor.addChild(root_0, f2.getTree());

                    retval.type = (f2!=null?f2.type:null); retval.parent = new Factor((f2!=null?f2.type:null), "-");

                    }
                    break;
                case 3 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:174:4: LPAR p2= primary_type RPAR f3= factor
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LPAR126=(Token)match(input,LPAR,FOLLOW_LPAR_in_factor1337); 
                    LPAR126_tree = 
                    (CommonTree)adaptor.create(LPAR126)
                    ;
                    adaptor.addChild(root_0, LPAR126_tree);


                    pushFollow(FOLLOW_primary_type_in_factor1341);
                    p2=primary_type();

                    state._fsp--;

                    adaptor.addChild(root_0, p2.getTree());

                    RPAR127=(Token)match(input,RPAR,FOLLOW_RPAR_in_factor1343); 
                    RPAR127_tree = 
                    (CommonTree)adaptor.create(RPAR127)
                    ;
                    adaptor.addChild(root_0, RPAR127_tree);


                    pushFollow(FOLLOW_factor_in_factor1347);
                    f3=factor();

                    state._fsp--;

                    adaptor.addChild(root_0, f3.getTree());

                    retval.type = (p2!=null?p2.type:null); (f3!=null?f3.type:null).setCast(retval.type); retval.parent = new Factor((f3!=null?f3.type:null), (p2!=null?p2.type:null));

                    }
                    break;
                case 4 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:175:4: LPAR condition RPAR
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    LPAR128=(Token)match(input,LPAR,FOLLOW_LPAR_in_factor1354); 
                    LPAR128_tree = 
                    (CommonTree)adaptor.create(LPAR128)
                    ;
                    adaptor.addChild(root_0, LPAR128_tree);


                    pushFollow(FOLLOW_condition_in_factor1356);
                    condition129=condition();

                    state._fsp--;

                    adaptor.addChild(root_0, condition129.getTree());

                    RPAR130=(Token)match(input,RPAR,FOLLOW_RPAR_in_factor1358); 
                    RPAR130_tree = 
                    (CommonTree)adaptor.create(RPAR130)
                    ;
                    adaptor.addChild(root_0, RPAR130_tree);


                    retval.type = (condition129!=null?condition129.type:null); retval.parent = new Factor((condition129!=null?condition129.parent:null),(condition129!=null?condition129.type:null));

                    }
                    break;
                case 5 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:176:4: p1= primary
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_primary_in_factor1367);
                    p1=primary();

                    state._fsp--;

                    adaptor.addChild(root_0, p1.getTree());

                    retval.type = (p1!=null?p1.type:null); retval.parent = (p1!=null?p1.type:null);

                    }
                    break;
                case 6 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:177:4: expr_f
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_expr_f_in_factor1374);
                    expr_f131=expr_f();

                    state._fsp--;

                    adaptor.addChild(root_0, expr_f131.getTree());

                    retval.type = (expr_f131!=null?expr_f131.type:null); retval.parent = (expr_f131!=null?expr_f131.parent:null);

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "factor"


    public static class primary_type_return extends ParserRuleReturnScope {
        public Type type;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "primary_type"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:179:1: primary_type returns [Type type] : ( FLOAT | INT | CHAR );
    public final myGrammarParser.primary_type_return primary_type() throws RecognitionException {
        myGrammarParser.primary_type_return retval = new myGrammarParser.primary_type_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token FLOAT132=null;
        Token INT133=null;
        Token CHAR134=null;

        CommonTree FLOAT132_tree=null;
        CommonTree INT133_tree=null;
        CommonTree CHAR134_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:179:32: ( FLOAT | INT | CHAR )
            int alt40=3;
            switch ( input.LA(1) ) {
            case FLOAT:
                {
                alt40=1;
                }
                break;
            case INT:
                {
                alt40=2;
                }
                break;
            case CHAR:
                {
                alt40=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 40, 0, input);

                throw nvae;

            }

            switch (alt40) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:180:2: FLOAT
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    FLOAT132=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_primary_type1389); 
                    FLOAT132_tree = 
                    (CommonTree)adaptor.create(FLOAT132)
                    ;
                    adaptor.addChild(root_0, FLOAT132_tree);


                    retval.type = new FloatType(true);

                    }
                    break;
                case 2 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:181:4: INT
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    INT133=(Token)match(input,INT,FOLLOW_INT_in_primary_type1397); 
                    INT133_tree = 
                    (CommonTree)adaptor.create(INT133)
                    ;
                    adaptor.addChild(root_0, INT133_tree);


                    retval.type = new IntType(true);

                    }
                    break;
                case 3 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:182:4: CHAR
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    CHAR134=(Token)match(input,CHAR,FOLLOW_CHAR_in_primary_type1404); 
                    CHAR134_tree = 
                    (CommonTree)adaptor.create(CHAR134)
                    ;
                    adaptor.addChild(root_0, CHAR134_tree);


                    retval.type = new CharType(true);

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "primary_type"


    public static class expr_f_return extends ParserRuleReturnScope {
        public Type type;
        public Factor parent;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "expr_f"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:184:1: expr_f returns [Type type, Factor parent] : ( funccall | printf | scanf );
    public final myGrammarParser.expr_f_return expr_f() throws RecognitionException {
        myGrammarParser.expr_f_return retval = new myGrammarParser.expr_f_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        myGrammarParser.funccall_return funccall135 =null;

        myGrammarParser.printf_return printf136 =null;

        myGrammarParser.scanf_return scanf137 =null;



        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:184:43: ( funccall | printf | scanf )
            int alt41=3;
            switch ( input.LA(1) ) {
            case IDENT:
                {
                alt41=1;
                }
                break;
            case 50:
                {
                alt41=2;
                }
                break;
            case 52:
                {
                alt41=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 41, 0, input);

                throw nvae;

            }

            switch (alt41) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:185:3: funccall
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_funccall_in_expr_f1422);
                    funccall135=funccall();

                    state._fsp--;

                    adaptor.addChild(root_0, funccall135.getTree());

                    retval.parent = (funccall135!=null?funccall135.parent:null); retval.type = (funccall135!=null?funccall135.type:null);

                    }
                    break;
                case 2 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:186:4: printf
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_printf_in_expr_f1431);
                    printf136=printf();

                    state._fsp--;

                    adaptor.addChild(root_0, printf136.getTree());

                    retval.parent =(printf136!=null?printf136.parent:null); retval.type =(printf136!=null?printf136.type:null);

                    }
                    break;
                case 3 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:187:4: scanf
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_scanf_in_expr_f1439);
                    scanf137=scanf();

                    state._fsp--;

                    adaptor.addChild(root_0, scanf137.getTree());

                    retval.parent =(scanf137!=null?scanf137.parent:null); retval.type =(scanf137!=null?scanf137.type:null);

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "expr_f"


    public static class primary_return extends ParserRuleReturnScope {
        public Type type;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "primary"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:189:1: primary returns [Type type] : ( REAL | INTEGER | CHAR_LITERAL | ident );
    public final myGrammarParser.primary_return primary() throws RecognitionException {
        myGrammarParser.primary_return retval = new myGrammarParser.primary_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token REAL138=null;
        Token INTEGER139=null;
        Token CHAR_LITERAL140=null;
        myGrammarParser.ident_return ident141 =null;


        CommonTree REAL138_tree=null;
        CommonTree INTEGER139_tree=null;
        CommonTree CHAR_LITERAL140_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:189:27: ( REAL | INTEGER | CHAR_LITERAL | ident )
            int alt42=4;
            switch ( input.LA(1) ) {
            case REAL:
                {
                alt42=1;
                }
                break;
            case INTEGER:
                {
                alt42=2;
                }
                break;
            case CHAR_LITERAL:
                {
                alt42=3;
                }
                break;
            case IDENT:
                {
                alt42=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 42, 0, input);

                throw nvae;

            }

            switch (alt42) {
                case 1 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:190:2: REAL
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    REAL138=(Token)match(input,REAL,FOLLOW_REAL_in_primary1453); 
                    REAL138_tree = 
                    (CommonTree)adaptor.create(REAL138)
                    ;
                    adaptor.addChild(root_0, REAL138_tree);


                    retval.type = new FloatType(Float.valueOf((REAL138!=null?REAL138.getText():null)), true);

                    }
                    break;
                case 2 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:191:4: INTEGER
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    INTEGER139=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_primary1461); 
                    INTEGER139_tree = 
                    (CommonTree)adaptor.create(INTEGER139)
                    ;
                    adaptor.addChild(root_0, INTEGER139_tree);


                    retval.type = new IntType(Integer.valueOf((INTEGER139!=null?INTEGER139.getText():null)), true);

                    }
                    break;
                case 3 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:192:4: CHAR_LITERAL
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    CHAR_LITERAL140=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_primary1468); 
                    CHAR_LITERAL140_tree = 
                    (CommonTree)adaptor.create(CHAR_LITERAL140)
                    ;
                    adaptor.addChild(root_0, CHAR_LITERAL140_tree);


                    retval.type = new CharType((CHAR_LITERAL140!=null?CHAR_LITERAL140.getText():null).charAt(0), true);

                    }
                    break;
                case 4 :
                    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:193:4: ident
                    {
                    root_0 = (CommonTree)adaptor.nil();


                    pushFollow(FOLLOW_ident_in_primary1476);
                    ident141=ident();

                    state._fsp--;

                    adaptor.addChild(root_0, ident141.getTree());

                    retval.type =(ident141!=null?ident141.type:null);

                    }
                    break;

            }
            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "primary"


    public static class ident_return extends ParserRuleReturnScope {
        public String name;
        public Type type;
        CommonTree tree;
        public Object getTree() { return tree; }
    };


    // $ANTLR start "ident"
    // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:195:1: ident returns [String name, Type type] : IDENT ;
    public final myGrammarParser.ident_return ident() throws RecognitionException {
        myGrammarParser.ident_return retval = new myGrammarParser.ident_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token IDENT142=null;

        CommonTree IDENT142_tree=null;

        try {
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:195:38: ( IDENT )
            // /Users/gertjanloots/Documents/workspace/Compilers4/src/compilers/myGrammar.g:196:1: IDENT
            {
            root_0 = (CommonTree)adaptor.nil();


            IDENT142=(Token)match(input,IDENT,FOLLOW_IDENT_in_ident1489); 
            IDENT142_tree = 
            (CommonTree)adaptor.create(IDENT142)
            ;
            adaptor.addChild(root_0, IDENT142_tree);


            retval.name = (IDENT142!=null?IDENT142.getText():null); retval.type = symbolTable.resolveVariable((IDENT142!=null?IDENT142.getText():null), input.LT(1), false); retval.type.setIdentifier(new Identifier(retval.name, input.LT(1), symbolTable.getScope()));

            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
    // $ANTLR end "ident"

    // Delegated rules


    protected DFA2 dfa2 = new DFA2(this);
    static final String DFA2_eotS =
        "\43\uffff";
    static final String DFA2_eofS =
        "\1\1\42\uffff";
    static final String DFA2_minS =
        "\1\4\2\uffff\1\4\5\15\1\6\1\23\1\4\1\uffff\1\4\4\6\1\21\1\6\2\uffff"+
        "\1\20\1\4\1\55\1\6\1\4\5\6\1\20\1\55\1\6";
    static final String DFA2_maxS =
        "\1\35\2\uffff\1\17\5\15\1\32\1\23\1\31\1\uffff\1\17\4\31\1\32\1"+
        "\54\2\uffff\1\55\1\17\1\55\1\31\1\17\4\31\1\54\2\55\1\31";
    static final String DFA2_acceptS =
        "\1\uffff\1\5\1\1\11\uffff\1\4\7\uffff\1\2\1\3\15\uffff";
    static final String DFA2_specialS =
        "\43\uffff}>";
    static final String[] DFA2_transitionS = {
            "\1\6\3\uffff\1\3\3\uffff\1\5\1\7\1\uffff\1\4\14\uffff\1\2\1"+
            "\10",
            "",
            "",
            "\1\6\7\uffff\1\5\1\7\1\uffff\1\4",
            "\1\11",
            "\1\11",
            "\1\11",
            "\1\11",
            "\1\12",
            "\1\14\4\uffff\1\14\7\uffff\1\13\6\uffff\1\14",
            "\1\13",
            "\1\20\3\uffff\1\15\3\uffff\1\17\1\21\1\uffff\1\16\11\uffff"+
            "\1\22",
            "",
            "\1\20\7\uffff\1\17\1\21\1\uffff\1\16",
            "\1\24\6\uffff\1\23\13\uffff\1\24",
            "\1\24\6\uffff\1\23\13\uffff\1\24",
            "\1\24\6\uffff\1\23\13\uffff\1\24",
            "\1\24\6\uffff\1\23\13\uffff\1\24",
            "\1\25\10\uffff\1\24",
            "\1\27\22\uffff\1\22\22\uffff\1\26",
            "",
            "",
            "\1\30\34\uffff\1\31",
            "\1\35\3\uffff\1\32\3\uffff\1\34\1\36\1\uffff\1\33",
            "\1\31",
            "\1\27\22\uffff\1\22",
            "\1\35\7\uffff\1\34\1\36\1\uffff\1\33",
            "\1\24\6\uffff\1\37\13\uffff\1\24",
            "\1\24\6\uffff\1\37\13\uffff\1\24",
            "\1\24\6\uffff\1\37\13\uffff\1\24",
            "\1\24\6\uffff\1\37\13\uffff\1\24",
            "\1\27\22\uffff\1\22\22\uffff\1\40",
            "\1\41\34\uffff\1\42",
            "\1\42",
            "\1\27\22\uffff\1\22"
    };

    static final short[] DFA2_eot = DFA.unpackEncodedString(DFA2_eotS);
    static final short[] DFA2_eof = DFA.unpackEncodedString(DFA2_eofS);
    static final char[] DFA2_min = DFA.unpackEncodedStringToUnsignedChars(DFA2_minS);
    static final char[] DFA2_max = DFA.unpackEncodedStringToUnsignedChars(DFA2_maxS);
    static final short[] DFA2_accept = DFA.unpackEncodedString(DFA2_acceptS);
    static final short[] DFA2_special = DFA.unpackEncodedString(DFA2_specialS);
    static final short[][] DFA2_transition;

    static {
        int numStates = DFA2_transitionS.length;
        DFA2_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA2_transition[i] = DFA.unpackEncodedString(DFA2_transitionS[i]);
        }
    }

    class DFA2 extends DFA {

        public DFA2(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 2;
            this.eot = DFA2_eot;
            this.eof = DFA2_eof;
            this.min = DFA2_min;
            this.max = DFA2_max;
            this.accept = DFA2_accept;
            this.special = DFA2_special;
            this.transition = DFA2_transition;
        }
        public String getDescription() {
            return "()* loopback of 39:13: ( typedef | funct_decl | funct | var )*";
        }
    }
 

    public static final BitSet FOLLOW_INCLUDE_in_include68 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_include_in_smallc_program85 = new BitSet(new long[]{0x000000003000B110L});
    public static final BitSet FOLLOW_typedef_in_smallc_program89 = new BitSet(new long[]{0x000000003000B110L});
    public static final BitSet FOLLOW_funct_decl_in_smallc_program97 = new BitSet(new long[]{0x000000003000B110L});
    public static final BitSet FOLLOW_funct_in_smallc_program105 = new BitSet(new long[]{0x000000003000B110L});
    public static final BitSet FOLLOW_var_in_smallc_program113 = new BitSet(new long[]{0x000000003000B110L});
    public static final BitSet FOLLOW_EOF_in_smallc_program119 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TYPEDEF_in_typedef137 = new BitSet(new long[]{0x000000000000B110L});
    public static final BitSet FOLLOW_type_in_typedef139 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_IDENT_in_typedef144 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_SEMI_in_typedef153 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_return_type_in_funct_decl169 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_IDENT_in_funct_decl171 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_LPAR_in_funct_decl175 = new BitSet(new long[]{0x000000000200B110L});
    public static final BitSet FOLLOW_paramlist_decl_in_funct_decl177 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_RPAR_in_funct_decl181 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_SEMI_in_funct_decl183 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_in_paramlist_decl202 = new BitSet(new long[]{0x0000000000002042L});
    public static final BitSet FOLLOW_IDENT_in_paramlist_decl210 = new BitSet(new long[]{0x0000100000000042L});
    public static final BitSet FOLLOW_44_in_paramlist_decl216 = new BitSet(new long[]{0x0000200000010000L});
    public static final BitSet FOLLOW_INTEGER_in_paramlist_decl223 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_45_in_paramlist_decl229 = new BitSet(new long[]{0x0000000000000042L});
    public static final BitSet FOLLOW_COMMA_in_paramlist_decl242 = new BitSet(new long[]{0x000000000000B110L});
    public static final BitSet FOLLOW_type_in_paramlist_decl246 = new BitSet(new long[]{0x0000000000002042L});
    public static final BitSet FOLLOW_IDENT_in_paramlist_decl254 = new BitSet(new long[]{0x0000100000000042L});
    public static final BitSet FOLLOW_44_in_paramlist_decl260 = new BitSet(new long[]{0x0000200000010000L});
    public static final BitSet FOLLOW_INTEGER_in_paramlist_decl267 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_45_in_paramlist_decl273 = new BitSet(new long[]{0x0000000000000042L});
    public static final BitSet FOLLOW_return_type_in_funct304 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_IDENT_in_funct306 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_LPAR_in_funct310 = new BitSet(new long[]{0x000000000200B110L});
    public static final BitSet FOLLOW_paramlist_in_funct314 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_RPAR_in_funct318 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_compound_stmt_func_in_funct321 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_in_paramlist338 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_IDENT_in_paramlist343 = new BitSet(new long[]{0x0000100000000042L});
    public static final BitSet FOLLOW_44_in_paramlist349 = new BitSet(new long[]{0x0000200000010000L});
    public static final BitSet FOLLOW_INTEGER_in_paramlist356 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_45_in_paramlist362 = new BitSet(new long[]{0x0000000000000042L});
    public static final BitSet FOLLOW_COMMA_in_paramlist376 = new BitSet(new long[]{0x000000000000B110L});
    public static final BitSet FOLLOW_type_in_paramlist380 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_IDENT_in_paramlist385 = new BitSet(new long[]{0x0000100000000042L});
    public static final BitSet FOLLOW_44_in_paramlist391 = new BitSet(new long[]{0x0000200000010000L});
    public static final BitSet FOLLOW_INTEGER_in_paramlist398 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_45_in_paramlist404 = new BitSet(new long[]{0x0000000000000042L});
    public static final BitSet FOLLOW_type_in_var418 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_varlist_in_var420 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_SEMI_in_var425 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_varid_in_varlist444 = new BitSet(new long[]{0x0000000000000042L});
    public static final BitSet FOLLOW_COMMA_in_varlist450 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_varid_in_varlist454 = new BitSet(new long[]{0x0000000000000042L});
    public static final BitSet FOLLOW_IDENT_in_varid480 = new BitSet(new long[]{0x0000000000000802L});
    public static final BitSet FOLLOW_EQUAL_in_varid487 = new BitSet(new long[]{0x00140020810B2020L});
    public static final BitSet FOLLOW_condition_in_varid492 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_array_init_in_varid499 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LBRACK_in_array_init514 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_array_init518 = new BitSet(new long[]{0x0000000000800040L});
    public static final BitSet FOLLOW_COMMA_in_array_init523 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_array_init527 = new BitSet(new long[]{0x0000000000800040L});
    public static final BitSet FOLLOW_RBRACK_in_array_init534 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CONST_in_type555 = new BitSet(new long[]{0x000000000000B010L});
    public static final BitSet FOLLOW_INT_in_type564 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FLOAT_in_type571 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CHAR_in_type578 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENT_in_type584 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_in_return_type601 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_VOID_in_return_type607 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_varstmt625 = new BitSet(new long[]{0x003EC020A109B132L});
    public static final BitSet FOLLOW_stmt_in_varstmt631 = new BitSet(new long[]{0x003EC020A109B132L});
    public static final BitSet FOLLOW_LBRACK_in_compound_stmt648 = new BitSet(new long[]{0x003EC020A189B130L});
    public static final BitSet FOLLOW_varstmt_in_compound_stmt652 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_RBRACK_in_compound_stmt656 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LBRACK_in_compound_stmt_func669 = new BitSet(new long[]{0x003EC020A189B130L});
    public static final BitSet FOLLOW_varstmt_in_compound_stmt_func671 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_RBRACK_in_compound_stmt_func674 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_cond_stmt_in_stmt687 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_while_stmt_in_stmt698 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_46_in_stmt709 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_SEMI_in_stmt712 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_47_in_stmt721 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_SEMI_in_stmt725 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_51_in_stmt733 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_SEMI_in_stmt735 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_51_in_stmt746 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_stmt748 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_SEMI_in_stmt752 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_stmt760 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_SEMI_in_stmt764 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_funct_in_stmt772 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_49_in_cond_stmt789 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_LPAR_in_cond_stmt791 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_cond_stmt793 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_RPAR_in_cond_stmt795 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_LBRACK_in_cond_stmt797 = new BitSet(new long[]{0x003EC020A189B130L});
    public static final BitSet FOLLOW_varstmt_in_cond_stmt803 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_RBRACK_in_cond_stmt805 = new BitSet(new long[]{0x0001000000000002L});
    public static final BitSet FOLLOW_48_in_cond_stmt817 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_LBRACK_in_cond_stmt819 = new BitSet(new long[]{0x003EC020A189B130L});
    public static final BitSet FOLLOW_varstmt_in_cond_stmt823 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_RBRACK_in_cond_stmt825 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_53_in_while_stmt841 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_LPAR_in_while_stmt843 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_while_stmt847 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_RPAR_in_while_stmt849 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_LBRACK_in_while_stmt851 = new BitSet(new long[]{0x003EC020A189B130L});
    public static final BitSet FOLLOW_varstmt_in_while_stmt855 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_RBRACK_in_while_stmt857 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_50_in_printf870 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_LPAR_in_printf872 = new BitSet(new long[]{0x0000000008000000L});
    public static final BitSet FOLLOW_STRING_LITERAL_in_printf874 = new BitSet(new long[]{0x0000000002000040L});
    public static final BitSet FOLLOW_COMMA_in_printf879 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_printf881 = new BitSet(new long[]{0x0000000002000040L});
    public static final BitSet FOLLOW_RPAR_in_printf887 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_52_in_scanf900 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_LPAR_in_scanf902 = new BitSet(new long[]{0x0000000008000000L});
    public static final BitSet FOLLOW_STRING_LITERAL_in_scanf904 = new BitSet(new long[]{0x0000000002000040L});
    public static final BitSet FOLLOW_COMMA_in_scanf909 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_ident_in_scanf911 = new BitSet(new long[]{0x0000000002000040L});
    public static final BitSet FOLLOW_RPAR_in_scanf917 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENT_in_funccall936 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_LPAR_in_funccall941 = new BitSet(new long[]{0x0014002083092020L});
    public static final BitSet FOLLOW_condition_in_funccall946 = new BitSet(new long[]{0x0000000002000040L});
    public static final BitSet FOLLOW_COMMA_in_funccall952 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_funccall956 = new BitSet(new long[]{0x0000000002000040L});
    public static final BitSet FOLLOW_RPAR_in_funccall966 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ident_in_expr985 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_EQUAL_in_expr987 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_expr991 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_condition_in_expr998 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_disjunction_in_condition1012 = new BitSet(new long[]{0x0000000000400002L});
    public static final BitSet FOLLOW_QMARK_in_condition1028 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_condition1032 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_DPOINT_in_condition1036 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_condition1040 = new BitSet(new long[]{0x0000000000400002L});
    public static final BitSet FOLLOW_conjunction_in_disjunction1057 = new BitSet(new long[]{0x0040000000000002L});
    public static final BitSet FOLLOW_54_in_disjunction1065 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_conjunction_in_disjunction1069 = new BitSet(new long[]{0x0040000000000002L});
    public static final BitSet FOLLOW_comparison_in_conjunction1086 = new BitSet(new long[]{0x0000000400000002L});
    public static final BitSet FOLLOW_34_in_conjunction1094 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_comparison_in_conjunction1098 = new BitSet(new long[]{0x0000000400000002L});
    public static final BitSet FOLLOW_relation_in_comparison1115 = new BitSet(new long[]{0x0000020100000002L});
    public static final BitSet FOLLOW_32_in_comparison1124 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_relation_in_comparison1128 = new BitSet(new long[]{0x0000020100000002L});
    public static final BitSet FOLLOW_41_in_comparison1136 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_relation_in_comparison1140 = new BitSet(new long[]{0x0000020100000002L});
    public static final BitSet FOLLOW_sum_in_relation1157 = new BitSet(new long[]{0x00000D8000000002L});
    public static final BitSet FOLLOW_39_in_relation1165 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_sum_in_relation1169 = new BitSet(new long[]{0x00000D8000000002L});
    public static final BitSet FOLLOW_40_in_relation1178 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_sum_in_relation1182 = new BitSet(new long[]{0x00000D8000000002L});
    public static final BitSet FOLLOW_42_in_relation1190 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_sum_in_relation1194 = new BitSet(new long[]{0x00000D8000000002L});
    public static final BitSet FOLLOW_43_in_relation1202 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_sum_in_relation1206 = new BitSet(new long[]{0x00000D8000000002L});
    public static final BitSet FOLLOW_term_in_sum1223 = new BitSet(new long[]{0x0000003000000002L});
    public static final BitSet FOLLOW_36_in_sum1230 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_term_in_sum1234 = new BitSet(new long[]{0x0000003000000002L});
    public static final BitSet FOLLOW_37_in_sum1241 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_term_in_sum1245 = new BitSet(new long[]{0x0000003000000002L});
    public static final BitSet FOLLOW_factor_in_term1262 = new BitSet(new long[]{0x0000004A00000002L});
    public static final BitSet FOLLOW_35_in_term1269 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_factor_in_term1273 = new BitSet(new long[]{0x0000004A00000002L});
    public static final BitSet FOLLOW_38_in_term1281 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_factor_in_term1285 = new BitSet(new long[]{0x0000004A00000002L});
    public static final BitSet FOLLOW_33_in_term1293 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_factor_in_term1297 = new BitSet(new long[]{0x0000004A00000002L});
    public static final BitSet FOLLOW_31_in_factor1313 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_factor_in_factor1317 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_37_in_factor1325 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_factor_in_factor1329 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LPAR_in_factor1337 = new BitSet(new long[]{0x0000000000009010L});
    public static final BitSet FOLLOW_primary_type_in_factor1341 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_RPAR_in_factor1343 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_factor_in_factor1347 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LPAR_in_factor1354 = new BitSet(new long[]{0x0014002081092020L});
    public static final BitSet FOLLOW_condition_in_factor1356 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_RPAR_in_factor1358 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_primary_in_factor1367 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_f_in_factor1374 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FLOAT_in_primary_type1389 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INT_in_primary_type1397 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CHAR_in_primary_type1404 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_funccall_in_expr_f1422 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_printf_in_expr_f1431 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_scanf_in_expr_f1439 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_REAL_in_primary1453 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INTEGER_in_primary1461 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CHAR_LITERAL_in_primary1468 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ident_in_primary1476 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENT_in_ident1489 = new BitSet(new long[]{0x0000000000000002L});

}